Skip to content

Commit

Permalink
fix off by one error in documentRange
Browse files Browse the repository at this point in the history
  • Loading branch information
kristoff-it authored and SuperAuguste committed Jun 9, 2022
1 parent 083dd5f commit fc5b1c6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/offsets.zig
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,8 @@ pub fn documentRange(doc: types.TextDocument, encoding: Encoding) !types.Range {
curr_line = line;
}

if (line_idx > 0) line_idx -= 1;

if (encoding == .utf8) {
return types.Range{
.start = .{
Expand Down

0 comments on commit fc5b1c6

Please sign in to comment.