diff --git a/src/widgets/helper/ResizingTextEdit.cpp b/src/widgets/helper/ResizingTextEdit.cpp index 92b5b8ef..cee49139 100644 --- a/src/widgets/helper/ResizingTextEdit.cpp +++ b/src/widgets/helper/ResizingTextEdit.cpp @@ -16,6 +16,11 @@ ResizingTextEdit::ResizingTextEdit() QObject::connect(this, &QTextEdit::textChanged, this, &QWidget::updateGeometry); + // Whenever the setting for emote completion changes, force a + // refresh on the completion model the next time "Tab" is pressed + getSettings()->prefixOnlyEmoteCompletion.connect( + [this] { this->completionInProgress_ = false; }); + this->setFocusPolicy(Qt::ClickFocus); } diff --git a/src/widgets/settingspages/GeneralPage.cpp b/src/widgets/settingspages/GeneralPage.cpp index aec81113..64365e0a 100644 --- a/src/widgets/settingspages/GeneralPage.cpp +++ b/src/widgets/settingspages/GeneralPage.cpp @@ -283,8 +283,10 @@ void GeneralPage::initLayout(SettingsLayout &layout) {"Don't show", "Always show", "Hold shift"}, s.emotesTooltipPreview, [](int index) { return index; }, [](auto args) { return args.index; }, false); - layout.addCheckbox("Only search for emote autocompletion at the start of emote names", - s.prefixOnlyEmoteCompletion); + + layout.addCheckbox( + "Only search for emote autocompletion at the start of emote names", + s.prefixOnlyEmoteCompletion); layout.addSpacing(16); layout.addSeperator();