From d3a15be9e97bf5f509b64f48d787e808866d922f Mon Sep 17 00:00:00 2001 From: Pierre-Marie Pédrot Date: Mon, 9 Feb 2015 09:46:05 +0100 Subject: Making undo/redo atomic in CoqIDE. --- ide/wg_ScriptView.ml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'ide/wg_ScriptView.ml') diff --git a/ide/wg_ScriptView.ml b/ide/wg_ScriptView.ml index 1f3990708..5d21efd95 100644 --- a/ide/wg_ScriptView.ml +++ b/ide/wg_ScriptView.ml @@ -186,11 +186,19 @@ object(self) method undo () = Minilib.log "UNDO"; - self#with_lock_undo self#perform_undo (); + self#with_lock_undo begin fun () -> + buffer#begin_user_action (); + self#perform_undo (); + buffer#end_user_action () + end () method redo () = Minilib.log "REDO"; - self#with_lock_undo self#perform_redo (); + self#with_lock_undo begin fun () -> + buffer#begin_user_action (); + self#perform_redo (); + buffer#end_user_action () + end () method process_begin_user_action () = (* Push a new level of event on history stack *) -- cgit v1.2.3