From 94846336dfae4e73dd5c1ec7fb3d61c71aa5f54a Mon Sep 17 00:00:00 2001 From: Martin Kleusberg Date: Sun, 19 Apr 2015 12:41:51 +0200 Subject: [PATCH] qscintilla: Finetune auto completion Only start auto completion after a three letter threshold. Only take words for auto completion from the API word list, not from the current document. --- src/sqltextedit.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sqltextedit.cpp b/src/sqltextedit.cpp index 99ae8038..a4106f65 100644 --- a/src/sqltextedit.cpp +++ b/src/sqltextedit.cpp @@ -60,10 +60,10 @@ SqlTextEdit::SqlTextEdit(QWidget* parent) : setCaretLineBackgroundColor(QColor(PreferencesDialog::getSettingsValue("syntaxhighlighter", "currentline_colour").toString())); // Enable auto completion - setAutoCompletionThreshold(1); + setAutoCompletionThreshold(3); setAutoCompletionCaseSensitivity(false); setAutoCompletionShowSingle(true); - setAutoCompletionSource(QsciScintilla::AcsAll); + setAutoCompletionSource(QsciScintilla::AcsAPIs); // Set icons for auto completion registerImage(SqlUiLexer::ApiCompleterIconIdKeyword, QImage(":/icons/keyword"));