Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@

- Add support for syntax highlighting in `%raw` and `%ffi` extension points. https://github.com/rescript-lang/rescript-vscode/pull/774

#### :bug: Bug Fix

- Fix invalid range for `definition`. https://github.com/rescript-lang/rescript-vscode/pull/781

## 1.18.0

#### :rocket: New Feature
Expand Down
4 changes: 2 additions & 2 deletions analysis/src/Commands.ml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ let definition ~path ~pos ~debug =
| Some locItem -> (
match References.definitionForLocItem ~full locItem with
| None -> None
| Some (uri, loc) ->
| Some (uri, loc) when not loc.loc_ghost ->
let isInterface = full.file.uri |> Uri.isInterface in
let posIsZero {Lexing.pos_lnum; pos_bol; pos_cnum} =
(* range is zero *)
Expand All @@ -113,7 +113,7 @@ let definition ~path ~pos ~debug =
else
Some
{Protocol.uri = Uri.toString uri; range = Utils.cmtLocToRange loc}
))
| Some _ -> None))
in
print_endline
(match locationOpt with
Expand Down