Coding style

- Add a version counter to the text widget.
- Only adding to history if the action changes the version counter.
- Don't recalculate the diff if the version stays the same.
This commit is contained in:
Andrew Hamilton 2022-06-23 22:07:21 +10:00
parent eb5254961b
commit 04aeacac14
3 changed files with 19 additions and 37 deletions

View file

@ -142,7 +142,6 @@ class TextEditorTestCase(unittest.TestCase):
self.editor.set_mark()
self.editor.cursor_down()
self._assert_change(self.editor.indent, " a\nb\nc", (0, 1))
self.assertIsNone(self.editor.mark)
self._set_editor("a\nb\nc", (1, 0))
self.editor.set_mark()
self.editor.cursor_left()