Skip to content

Commit

Permalink
do not look for documentation in the last opened file,
Browse files Browse the repository at this point in the history
use the current file
	fixes ocaml/ocaml-lsp#344
  • Loading branch information
ulugbekna committed May 7, 2021
1 parent 018dd6f commit 7fe6190
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/analysis/locate.ml
Original file line number Diff line number Diff line change
Expand Up @@ -831,13 +831,6 @@ let get_doc ~config ~env ~local_defs ~comments ~pos =
| `Found (_, Some doc) ->
`Found doc
| `Found (loc, None) ->
let comments =
match File_switching.where_am_i () with
| None -> comments
| Some cmt_path ->
let {Cmt_cache. cmt_infos; _ } = Cmt_cache.read cmt_path in
cmt_infos.Cmt_format.cmt_comments
in
log ~title:"get_doc" "%a" Logger.fmt (fun fmt ->
Format.fprintf fmt "looking around %a inside: [\n"
Location.print_loc !last_location;
Expand Down

0 comments on commit 7fe6190

Please sign in to comment.