From ff7dfbd1fe524f7d773c59df4f58c035973ba420 Mon Sep 17 00:00:00 2001 From: "Owen W. Taylor" Date: Tue, 30 Oct 2007 09:23:28 -0400 Subject: [PATCH] Move cursor when undoing and redoing inserts and deletes --- lib/reinteract/undo_stack.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/reinteract/undo_stack.py b/lib/reinteract/undo_stack.py index d8efb0a..340f6f2 100644 --- a/lib/reinteract/undo_stack.py +++ b/lib/reinteract/undo_stack.py @@ -13,11 +13,13 @@ class _InsertDeleteOp(object): def _insert(self, buffer): start = buffer._get_iter_at_nr_pos(self.start) buffer.insert_interactive(start, self.text, True) + buffer.place_cursor(start) def _delete(self, buffer): start = buffer._get_iter_at_nr_pos(self.start) end = buffer._get_iter_at_nr_pos(self.end) buffer.delete_interactive(start, end, True) + buffer.place_cursor(start) class InsertOp(_InsertDeleteOp): def redo(self, buffer): -- 2.11.4.GIT