Skip to content

Commit

Permalink
feat(semanticTokens): decrease highlighting range
Browse files Browse the repository at this point in the history
From [start-height*1.5, end+height*1.5] to [start-height/2, end+height/2], decrease items to highlight
  • Loading branch information
fannheyward committed Nov 26, 2024
1 parent aacbbca commit 7f8908f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/handler/semanticTokens/buffer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -389,8 +389,8 @@ export default class SemanticTokensBuffer implements SyncItem {
let height = workspace.env.lines
spans.forEach(o => {
let s = o[0]
o[0] = Math.max(0, Math.floor(s - height * 1.5))
o[1] = Math.min(lineCount, Math.ceil(o[1] + height * 1.5), s + height * 2)
o[0] = Math.max(0, Math.floor(s - height / 2))
o[1] = Math.min(lineCount, Math.ceil(o[1] + height / 2), s + height / 2)
})
for (let [start, end] of Regions.mergeSpans(spans)) {
if (!skipCheck && regions.has(start, end)) continue
Expand Down

0 comments on commit 7f8908f

Please sign in to comment.