diff options
author | 2015-03-22 12:07:45 +0100 | |
---|---|---|
committer | 2015-03-22 12:08:47 +0100 | |
commit | deadfb32365e903378515b1004e5109d47720411 (patch) | |
tree | 0f638df72c06f71f461080f39e52eaf28a7caa92 | |
parent | c6e628b75a549ade8b1133fdea9101f49ca4f991 (diff) |
STM: after every command restore the expected proof mode
-rw-r--r-- | stm/stm.ml | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/stm/stm.ml b/stm/stm.ml index 473065bed..f1ff254f0 100644 --- a/stm/stm.ml +++ b/stm/stm.ml @@ -1896,9 +1896,16 @@ let observe id = iraise e let finish ?(print_goals=false) () = - observe (VCS.get_branch_pos (VCS.current_branch ())); + let head = VCS.current_branch () in + observe (VCS.get_branch_pos head); if print_goals then msg_notice (pr_open_cur_subgoals ()); - VCS.print () + VCS.print (); + (* Some commands may by side effect change the proof mode *) + match VCS.get_branch head with + | { VCS.kind = `Edit (mode, _, _) } -> Proof_global.activate_proof_mode mode + | { VCS.kind = `Proof (mode, _) } -> Proof_global.activate_proof_mode mode + | _ -> () + let wait () = Slaves.wait_all_done (); |