--- a/QScintilla/Editor.py Thu Oct 19 19:39:59 2017 +0200 +++ b/QScintilla/Editor.py Fri Oct 20 22:56:57 2017 +0200 @@ -4646,21 +4646,23 @@ if self.__completionListHookFunctions or \ self.__completionListAsyncHookFunctions: - if Preferences.getEditor("AutoCompletionTimeout"): + if auto and Preferences.getEditor("AutoCompletionTimeout"): self.__acTimer.stop() self.__acContext = context self.__acTimer.start() else: - self.__autoComplete(context) + self.__autoComplete(auto, context) elif not auto: self.autoCompleteQScintilla() elif self.autoCompletionSource() != QsciScintilla.AcsNone: self.autoCompleteQScintilla() - def __autoComplete(self, context=None): + def __autoComplete(self, auto=True, context=None): """ Private method to start auto-completion via plug-ins. + @keyparam auto flag indicating a call from the __charAdded method + (boolean) @keyparam context flag indicating to complete a context @type bool or None """ @@ -4672,6 +4674,10 @@ self.__acText = self.getWordLeft(line, col) self.__acCompletions.clear() + # Suppress empty completions + if auto and self.__acText == '': + return + completions = self.__acCache.get(self.__acText) if completions is not None: # show list with cached entries