Skip to content

Commit 51a7ae2

Browse files
authored
Fix region folding off-by-one error (#726)
1 parent 7fe6214 commit 51a7ae2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Server.zig

+2-2
Original file line numberDiff line numberDiff line change
@@ -2401,8 +2401,8 @@ fn foldingRangeHandler(server: *Server, writer: anytype, id: types.RequestId, re
24012401
}
24022402
if (tok > 1) { // each container doc comment has its own line, so each one counts for a line
24032403
try ranges.append(.{
2404-
.startLine = 1,
2405-
.endLine = tok,
2404+
.startLine = 0,
2405+
.endLine = tok - 1,
24062406
});
24072407
}
24082408
}

0 commit comments

Comments
 (0)