Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
favonia committed Oct 21, 2024
1 parent 368e72b commit c209fdb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
6 changes: 1 addition & 5 deletions src-lsp/LspShims.ml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,7 @@ struct
let lsp_range_of_range (r : Asai.Range.t option) =
match r with
| Some r ->
let (start , stop) =
match Asai.Range.view r with
| `Range (start, stop) -> start, stop
| `End_of_file pos -> pos, pos
in
let (start, stop) = Asai.Range.split r in
L.Range.create
~start:(lsp_pos_of_pos start)
~end_:(lsp_pos_of_pos stop)
Expand Down
4 changes: 2 additions & 2 deletions test/TestTty.ml
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ let exec handler =
Loctext.make ~loc:(Range.make (~@ s2 10 0, ~@ s2 10 0)) "message 8";
];

Reporter.emit ~loc:(Range.eof (~@ s1 23 width)) Hello "this is the main message"
Reporter.emit ~loc:(Range.make (~@ s1 23 width, ~@ s1 23 width)) Hello "this is the main message"
~extra_remarks:[
Loctext.make ~loc:(Range.eof (~@ s2 23 width)) "ending of another file";
Loctext.make ~loc:(Range.make (~@ s2 23 width, ~@ s2 23 width)) "ending of another file";
]

let () =
Expand Down

0 comments on commit c209fdb

Please sign in to comment.