--- a/QScintilla/Editor.py Thu Aug 02 18:38:40 2018 +0200 +++ b/QScintilla/Editor.py Sat Sep 01 10:24:02 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