Skip to content

Commit cca82a3

Browse files
committed
#3407 ai-autocomplete: only do any highlighting if enabled
Signed-off-by: Patrizio Bekerle <[email protected]>
1 parent 5a20650 commit cca82a3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/widgets/qownnotesmarkdowntextedit.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1313,6 +1313,11 @@ void QOwnNotesMarkdownTextEdit::requestAiAutocomplete() {
13131313
* Shows the AI autocomplete suggestion
13141314
*/
13151315
void QOwnNotesMarkdownTextEdit::showAiAutocompleteSuggestion(const QString &suggestion) {
1316+
SettingsService settings;
1317+
if (!settings.value(QStringLiteral("ai/autocompleteEnabled")).toBool()) {
1318+
return;
1319+
}
1320+
13161321
qDebug() << __func__ << " - 'suggestion': " << suggestion;
13171322

13181323
if (suggestion.isEmpty()) {

0 commit comments

Comments
 (0)