fix off by one error in documentRange

This commit is contained in:
Loris Cro 2022-06-09 23:48:18 +02:00 committed by Auguste Rame
parent 083dd5fbdf
commit fc5b1c6457

View File

@ -190,6 +190,8 @@ pub fn documentRange(doc: types.TextDocument, encoding: Encoding) !types.Range {
curr_line = line; curr_line = line;
} }
if (line_idx > 0) line_idx -= 1;
if (encoding == .utf8) { if (encoding == .utf8) {
return types.Range{ return types.Range{
.start = .{ .start = .{