mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-01-27 14:57:09 -05:00
parent
17dc022e15
commit
40ee047ef0
@ -337,7 +337,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…
x
Reference in New Issue
Block a user