We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 740994e commit 7d48a7bCopy full SHA for 7d48a7b
src/gui/tag/TagsEdit.cpp
@@ -337,7 +337,7 @@ struct TagsEdit::Impl
337
assert(i < tags.size());
338
auto occurrencesOfCurrentText =
339
std::count_if(tags.cbegin(), tags.cend(), [this](const auto& tag) { return tag.text == currentText(); });
340
- if (currentText().isEmpty() || occurrencesOfCurrentText > 1) {
+ if ((currentText().isEmpty() && tags.size() > 1) || occurrencesOfCurrentText > 1) {
341
tags.erase(std::next(tags.begin(), std::ptrdiff_t(editing_index)));
342
if (editing_index <= i) { // Do we shift positions after `i`?
343
--i;
0 commit comments