Mon, 27 Aug 2018 18:53:41 +0200
Editor: added some code to cope with potential empty completion text.
QScintilla/Editor.py | file | annotate | diff | comparison | revisions |
--- a/QScintilla/Editor.py Sun Aug 26 17:15:17 2018 +0200 +++ b/QScintilla/Editor.py Mon Aug 27 18:53:41 2018 +0200 @@ -4695,10 +4695,14 @@ """ line, col = self.getCursorPosition() text = self.text(line) - if self.__isStartChar(text[col - 1]): - self.__acText = self.getWordLeft(line, col - 1) + text[col - 1] - else: - self.__acText = self.getWordLeft(line, col) + try: + if self.__isStartChar(text[col - 1]): + self.__acText = self.getWordLeft(line, col - 1) + text[col - 1] + else: + self.__acText = self.getWordLeft(line, col) + except IndexError: + self.__acText = "" + self.__acCompletions.clear() self.__acCompletionsFinished = 0