--- a/QScintilla/Editor.py Fri Dec 22 18:15:46 2017 +0100 +++ b/QScintilla/Editor.py Fri Dec 22 18:26:42 2017 +0100 @@ -4825,6 +4825,7 @@ if len(lst) > 1: txt = lst[0] + self.beginUndoAction() if Preferences.getEditor("AutoCompletionReplaceWord"): self.selectCurrentWord() self.removeSelectedText() @@ -4839,6 +4840,7 @@ elif wLeft: txt = txt[len(wLeft):] self.insert(txt) + self.endUndoAction() self.setCursorPosition(line, col + len(txt)) elif listId == TemplateCompletionListID: self.__applyTemplate(txt, self.getLanguage())