We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9e35e0a commit 05bb11aCopy full SHA for 05bb11a
src/vs/workbench/services/treeSitter/browser/treeSitterTokenizationFeature.ts
@@ -566,7 +566,8 @@ export class TreeSitterTokenizationSupport extends Disposable implements ITreeSi
566
if (position !== undefined) {
567
let oldBracket = endOffsetsAndScopes[position].bracket;
568
// Check that the previous token ends at the same point that the current token starts
569
- if ((position > 0) && (endOffsetsAndScopes[position - 1].endOffset !== startOffset)) {
+ const prevEndOffset = position > 0 ? endOffsetsAndScopes[position - 1].endOffset : 0;
570
+ if (prevEndOffset !== startOffset) {
571
let preInsertBracket: number[] | undefined = undefined;
572
if (oldBracket && oldBracket.length > 0) {
573
preInsertBracket = [];
0 commit comments