Skip to content

Commit

Permalink
LSP Position and Range are zero-based
Browse files Browse the repository at this point in the history
  • Loading branch information
ulugbekna committed Aug 18, 2021
1 parent f790024 commit 9cd85ed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ocaml-lsp-server/src/range.ml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ let compare_size (x : t) (y : t) =
(dx.character, dy.character)

let first_line =
let start = { Position.line = 1; character = 0 } in
let end_ = { Position.line = 2; character = 0 } in
let start = { Position.line = 0; character = 0 } in
let end_ = { Position.line = 1; character = 0 } in
{ start; end_ }

let of_loc (loc : Loc.t) : t =
Expand Down

0 comments on commit 9cd85ed

Please sign in to comment.