diff --git a/CHANGELOG.md b/CHANGELOG.md index bc47ac403..2b107fb97 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ - Bugfix: Fixed input in reply thread popup losing focus when dragging. (#4815) - Bugfix: Fixed the Quick Switcher (CTRL+K) from sometimes showing up on the wrong window. (#4819) - Bugfix: Fixed too much text being copied when copying chat messages. (#4812, #4830, #4839) +- Bugfix: Fixed an issue where the setting `Only search for emote autocompletion at the start of emote names` wouldn't disable if it was enabled when the client started. (#4855) - Bugfix: Fixed empty page being added when showing out of bounds dialog. (#4849) - Bugfix: Fixed issue on Windows preventing the title bar from being dragged in the top left corner. (#4873) - Bugfix: Fixed an issue where reply context didn't render correctly if an emoji was touching text. (#4875) diff --git a/src/widgets/helper/ResizingTextEdit.cpp b/src/widgets/helper/ResizingTextEdit.cpp index 1f400ee48..8012e1951 100644 --- a/src/widgets/helper/ResizingTextEdit.cpp +++ b/src/widgets/helper/ResizingTextEdit.cpp @@ -152,10 +152,10 @@ void ResizingTextEdit::keyPressEvent(QKeyEvent *event) return; } - QString currentCompletionPrefix = this->textUnderCursor(); + QString currentCompletion = this->textUnderCursor(); // check if there is something to complete - if (currentCompletionPrefix.size() <= 1) + if (currentCompletion.size() <= 1) { return; } @@ -170,13 +170,12 @@ void ResizingTextEdit::keyPressEvent(QKeyEvent *event) // First type pressing tab after modifying a message, we refresh our // completion model this->completer_->setModel(completionModel); - completionModel->updateResults(currentCompletionPrefix, + completionModel->updateResults(currentCompletion, this->isFirstWord()); this->completionInProgress_ = true; { // this blocks cursor movement events from resetting tab completion QSignalBlocker dontTriggerCursorMovement(this); - this->completer_->setCompletionPrefix(currentCompletionPrefix); this->completer_->complete(); } return; @@ -260,15 +259,6 @@ void ResizingTextEdit::setCompleter(QCompleter *c) this->completer_->setCompletionMode(QCompleter::InlineCompletion); this->completer_->setCaseSensitivity(Qt::CaseInsensitive); - if (getSettings()->prefixOnlyEmoteCompletion) - { - this->completer_->setFilterMode(Qt::MatchStartsWith); - } - else - { - this->completer_->setFilterMode(Qt::MatchContains); - } - QObject::connect(completer_, static_cast( &QCompleter::highlighted),