Skip to content

Commit

Permalink
Fix region folding off-by-one error (#726)
Browse files Browse the repository at this point in the history
  • Loading branch information
InKryption authored Oct 28, 2022
1 parent 7fe6214 commit 51a7ae2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Server.zig
Original file line number Diff line number Diff line change
Expand Up @@ -2401,8 +2401,8 @@ fn foldingRangeHandler(server: *Server, writer: anytype, id: types.RequestId, re
}
if (tok > 1) { // each container doc comment has its own line, so each one counts for a line
try ranges.append(.{
.startLine = 1,
.endLine = tok,
.startLine = 0,
.endLine = tok - 1,
});
}
}
Expand Down

0 comments on commit 51a7ae2

Please sign in to comment.