diff options
author | Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr> | 2015-02-15 21:02:33 +0100 |
---|---|---|
committer | Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr> | 2015-02-15 21:15:26 +0100 |
commit | 6b5bc2ceb986913bf28a08dadb1e4ef01a595a3b (patch) | |
tree | e28dd5aaf812b28f0043577e0ce3cbaf00bfc53a /ide/preferences.ml | |
parent | 1d39965a694698c3df238fc424203c6b77b067e7 (diff) |
CoqIDE now remembers the path of the last opened project.
Fixes bug #2762.
Diffstat (limited to 'ide/preferences.ml')
-rw-r--r-- | ide/preferences.ml | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ide/preferences.ml b/ide/preferences.ml index 9a4fde2f6..d32920ed3 100644 --- a/ide/preferences.ml +++ b/ide/preferences.ml @@ -105,6 +105,7 @@ type pref = mutable read_project : project_behavior; mutable project_file_name : string; + mutable project_path : string option; mutable encoding : inputenc; @@ -182,6 +183,7 @@ let current = { read_project = Ignore_args; project_file_name = "_CoqProject"; + project_path = None; encoding = if Sys.os_type = "Win32" then Eutf8 else Elocale; @@ -265,6 +267,7 @@ let save_pref () = add "project_options" [string_of_project_behavior p.read_project] ++ add "project_file_name" [p.project_file_name] ++ + add "project_path" (match p.project_path with None -> [] | Some s -> [s]) ++ add "encoding" [string_of_inputenc p.encoding] ++ @@ -342,6 +345,7 @@ let load_pref () = set_hd "project_options" (fun v -> np.read_project <- (project_behavior_of_string v)); set_hd "project_file_name" (fun v -> np.project_file_name <- v); + set_option "project_path" (fun v -> np.project_path <- v); set "automatic_tactics" (fun v -> np.automatic_tactics <- v); set_hd "cmd_print" (fun v -> np.cmd_print <- v); |