Added encoding offset aware documentRange

This commit is contained in:
Alexandros Naskos
2020-07-03 12:39:58 +03:00
parent 28b3cafc3f
commit 6bf2c9a1c7
3 changed files with 47 additions and 22 deletions

View File

@@ -1245,7 +1245,7 @@ fn formattingHandler(arena: *std.heap.ArenaAllocator, id: types.RequestId, req:
.result = .{
.TextEdits = &[1]types.TextEdit{
.{
.range = handle.document.range(),
.range = try offsets.documentRange(handle.document, offset_encoding),
.newText = stdout_bytes,
},
},