--- a/QScintilla/Editor.py Fri Dec 22 16:21:40 2017 +0100 +++ b/QScintilla/Editor.py Fri Dec 22 16:36:02 2017 +0100 @@ -4576,6 +4576,14 @@ return False + def __autocompletionCancelled(self): + """ + Private slot to handle the cancellation of an auto-completion list. + """ + self.__acWatchdog.stop() + + self.__acText = "" + ################################################################# ## auto-completion hook interfaces ################################################################# @@ -4612,6 +4620,7 @@ if self.autoCompletionThreshold() > 0: self.setAutoCompletionThreshold(0) self.SCN_CHARADDED.connect(self.__charAdded) + self.SCN_AUTOCCANCELLED.connect(self.__autocompletionCancelled) if async: self.__completionListAsyncHookFunctions[key] = func @@ -4634,6 +4643,7 @@ if not self.__completionListHookFunctions and \ not self.__completionListAsyncHookFunctions: self.SCN_CHARADDED.disconnect(self.__charAdded) + self.SCN_AUTOCCANCELLED.disconnect(self.__autocompletionCancelled) if self.autoCompletionThreshold() == 0: self.setAutoCompletionThreshold( Preferences.getEditor("AutoCompletionThreshold"))