diff --git a/qt-ui/tagwidget.cpp b/qt-ui/tagwidget.cpp index fbebe3f35..dfeeac537 100644 --- a/qt-ui/tagwidget.cpp +++ b/qt-ui/tagwidget.cpp @@ -146,13 +146,8 @@ void TagWidget::completionSelected(const QString& completion) void TagWidget::completionHighlighted(const QString& completion) { QPair pos = getCursorTagPosition(); - if (pos.first >= 0 && pos.second > 0) { - setText(text().remove(pos.first, pos.second - pos.first).insert(pos.first, completion)); - setCursorPosition(pos.first + completion.length()); - } else { - setText(completion + QString(", ")); - setCursorPosition(text().length()); - } + setText(text().remove(pos.first, pos.second - pos.first).insert(pos.first, completion)); + setCursorPosition(pos.first + completion.length()); } void TagWidget::setCursorPosition(int position)