Wrapped the application of a completion in beginUndoAction()/endUndoAction() to register it as an undoable change.

Fri, 22 Dec 2017 18:26:42 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Fri, 22 Dec 2017 18:26:42 +0100
changeset 6036
d65f5052fb10
parent 6035
6cac9ce8ab15
child 6037
9aec96a3a82a

Wrapped the application of a completion in beginUndoAction()/endUndoAction() to register it as an undoable change.

QScintilla/Editor.py file | annotate | diff | comparison | revisions
--- 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())

eric ide

mercurial