diff --git a/src/handler/semanticTokens/buffer.ts b/src/handler/semanticTokens/buffer.ts index 0330e0332bf..012c39b7113 100644 --- a/src/handler/semanticTokens/buffer.ts +++ b/src/handler/semanticTokens/buffer.ts @@ -388,9 +388,8 @@ export default class SemanticTokensBuffer implements SyncItem { if (token.isCancellationRequested || spans.length === 0) return let height = workspace.env.lines spans.forEach(o => { - let s = o[0] - o[0] = Math.max(0, Math.floor(s - height / 2)) - o[1] = Math.min(lineCount, Math.ceil(o[1] + height / 2), s + height / 2) + o[0] = Math.max(0, Math.floor(o[0] - height / 2)) + o[1] = Math.min(lineCount, Math.ceil(o[1] + height / 2)) }) for (let [start, end] of Regions.mergeSpans(spans)) { if (!skipCheck && regions.has(start, end)) continue