aboutsummaryrefslogtreecommitdiffhomepage
path: root/ide/coqide.ml
diff options
context:
space:
mode:
Diffstat (limited to 'ide/coqide.ml')
-rw-r--r--ide/coqide.ml17
1 files changed, 10 insertions, 7 deletions
diff --git a/ide/coqide.ml b/ide/coqide.ml
index 7007d0509..c3f2e48ef 100644
--- a/ide/coqide.ml
+++ b/ide/coqide.ml
@@ -1409,13 +1409,16 @@ Please restart and report NOW.";
(out_some ((Vector.get input_views index).analyzed_view))
#filename
with
- | None -> initial_cwd
- | Some f -> Filename.dirname f
- )
- in
- if not (is_in_coq_lib dir) then
- ignore (Coq.interp (Printf.sprintf "Add LoadPath \"%s\". " dir));
- Sys.chdir dir
+ | None -> ()
+ | Some f ->
+ if not (is_in_coq_path f) then
+ begin
+ let dir = Filename.dirname f in
+ ignore (Coq.interp
+ (Printf.sprintf "Add LoadPath \"%s\". " dir))
+ end)
+ in ()
+
method electric_handler =