Skip to content

Commit 85ea7d9

Browse files
aspeddrozth
authored andcommitted
fix invalid range
1 parent 9c069b7 commit 85ea7d9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

analysis/src/Commands.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ let definition ~path ~pos ~debug =
9494
| Some locItem -> (
9595
match References.definitionForLocItem ~full locItem with
9696
| None -> None
97-
| Some (uri, loc) ->
97+
| Some (uri, loc) when not loc.loc_ghost ->
9898
let isInterface = full.file.uri |> Uri.isInterface in
9999
let posIsZero {Lexing.pos_lnum; pos_bol; pos_cnum} =
100100
(* range is zero *)
@@ -113,7 +113,7 @@ let definition ~path ~pos ~debug =
113113
else
114114
Some
115115
{Protocol.uri = Uri.toString uri; range = Utils.cmtLocToRange loc}
116-
))
116+
| Some _ -> None))
117117
in
118118
print_endline
119119
(match locationOpt with

0 commit comments

Comments
 (0)