Skip to content

Commit 242d226

Browse files
committed
Fix max range for formatting for other lsp users
1 parent 0b7bcea commit 242d226

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

server/src/server.ts

+2-4
Original file line numberDiff line numberDiff line change
@@ -456,14 +456,12 @@ function onMessage(msg: m.Message) {
456456
extension === c.resiExt
457457
);
458458
if (formattedResult.kind === "success") {
459+
let max = formattedResult.result.length;
459460
let result: p.TextEdit[] = [
460461
{
461462
range: {
462463
start: { line: 0, character: 0 },
463-
end: {
464-
line: Number.MAX_VALUE,
465-
character: Number.MAX_VALUE,
466-
},
464+
end: { line: max, character: max },
467465
},
468466
newText: formattedResult.result,
469467
},

0 commit comments

Comments
 (0)