mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2026-03-11 08:54:48 +00:00
parent
09e47d3731
commit
ef2b5e7c26
1 changed files with 1 additions and 1 deletions
|
|
@ -343,7 +343,7 @@ struct TagsEdit::Impl
|
|||
assert(i < tags.size());
|
||||
auto occurrencesOfCurrentText =
|
||||
std::count_if(tags.cbegin(), tags.cend(), [this](const auto& tag) { return tag.text == currentText(); });
|
||||
if (currentText().isEmpty() || occurrencesOfCurrentText > 1) {
|
||||
if (tags.size() > 1 && (currentText().isEmpty() || occurrencesOfCurrentText > 1)) {
|
||||
tags.erase(std::next(tags.begin(), std::ptrdiff_t(editing_index)));
|
||||
if (editing_index <= i) { // Do we shift positions after `i`?
|
||||
--i;
|
||||
|
|
|
|||
Loading…
Reference in a new issue