aboutsummaryrefslogtreecommitdiff
path: root/ide/command_windows.ml
diff options
context:
space:
mode:
Diffstat (limited to 'ide/command_windows.ml')
-rw-r--r--ide/command_windows.ml7
1 files changed, 5 insertions, 2 deletions
diff --git a/ide/command_windows.ml b/ide/command_windows.ml
index beb8ebb526..1b768de9a2 100644
--- a/ide/command_windows.ml
+++ b/ide/command_windows.ml
@@ -6,6 +6,8 @@
(* * GNU Lesser General Public License Version 2.1 *)
(************************************************************************)
+let get_current_toplevel = ref (fun () -> Coq.dummy_coqtop)
+
class command_window () =
(* let window = GWindow.window
~allow_grow:true ~allow_shrink:true
@@ -104,9 +106,10 @@ object(self)
then com ^ " " else com ^ " " ^ entry#text ^" . "
in
try
- Coq.raw_interp Coq.dummy_coqtop phrase;
+ let curtop = !get_current_toplevel () in
+ Coq.raw_interp curtop phrase;
result#buffer#set_text
- ("Result for command " ^ phrase ^ ":\n" ^ (Coq.read_stdout Coq.dummy_coqtop))
+ ("Result for command " ^ phrase ^ ":\n" ^ (Coq.read_stdout curtop))
with e ->
let (s,loc) = Coq.process_exn e in
assert (Glib.Utf8.validate s);