Skip to content

Commit

Permalink
fix(semanticTokens): replace data instead of delete (#3310)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinhwang91 authored Aug 26, 2021
1 parent 378711e commit 0b3d30a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/handler/semanticTokensHighlights/buffer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ export default class SemanticTokensBuffer implements SyncItem {
tokens = previousResult.tokens
result.edits.forEach(e => {
if (e.deleteCount > 0) {
tokens.splice(e.start, e.deleteCount)
tokens.splice(e.start, e.deleteCount, ...e.data)
} else {
tokens.splice(e.start, 0, ...e.data)
}
Expand Down

0 comments on commit 0b3d30a

Please sign in to comment.