Skip to content

Commit

Permalink
Added missing document store restoration step in recomputation
Browse files Browse the repository at this point in the history
  • Loading branch information
darrenldl committed Jul 31, 2024
1 parent 712ce28 commit b9a6368
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bin/docfd.ml
Original file line number Diff line number Diff line change
Expand Up @@ -631,10 +631,13 @@ let run
| Ui_base.Recompute_document_src -> (
let document_src = compute_document_src () in
let old_document_store = Lwd.peek Ui_base.Vars.document_store in
let file_path_filter_glob = Document_store.file_path_filter_glob old_document_store in
let file_path_filter_re = Document_store.file_path_filter_re old_document_store in
let search_exp_text = Document_store.search_exp_text old_document_store in
let search_exp = Document_store.search_exp old_document_store in
let document_store =
document_store_of_document_src ~env pool document_src
|> Document_store.update_file_path_filter_glob file_path_filter_glob file_path_filter_re
|> Document_store.update_search_exp pool (Stop_signal.make ()) search_exp_text search_exp
in
Document_store_manager.submit_update_req document_store Ui_base.Vars.document_store;
Expand Down
4 changes: 4 additions & 0 deletions bin/document_store.ml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ let empty : t =
search_results = String_map.empty;
}

let file_path_filter_glob (t : t) = t.file_path_filter_glob

let file_path_filter_re (t : t) = t.file_path_filter_re

let search_exp (t : t) = t.search_exp

let search_exp_text (t : t) = t.search_exp_text
Expand Down
4 changes: 4 additions & 0 deletions bin/document_store.mli
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ val update_search_exp :
t ->
t

val file_path_filter_glob : t -> string

val file_path_filter_re : t -> Re.re

val search_exp : t -> Search_exp.t

val search_exp_text : t -> string
Expand Down

0 comments on commit b9a6368

Please sign in to comment.