Fix region folding off-by-one error (#726)

This commit is contained in:
InKryption
2022-10-28 22:59:33 +02:00
committed by GitHub
parent 7fe62147a3
commit 51a7ae2274

View File

@@ -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,
});
}
}