diff options
author | Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr> | 2015-02-09 09:46:05 +0100 |
---|---|---|
committer | Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr> | 2015-02-10 00:07:14 +0100 |
commit | d3a15be9e97bf5f509b64f48d787e808866d922f (patch) | |
tree | f0dbbb9c81b2a5127884891ccb54b4f202d98d91 /ide/wg_ScriptView.ml | |
parent | 927b611f05a09f3e9dc1f9b38c629ba439f33b42 (diff) |
Making undo/redo atomic in CoqIDE.
Diffstat (limited to 'ide/wg_ScriptView.ml')
-rw-r--r-- | ide/wg_ScriptView.ml | 12 |
1 files changed, 10 insertions, 2 deletions
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 *) |