Skip to content

Commit 05bb11a

Browse files
committed
Thank you tests
1 parent 9e35e0a commit 05bb11a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/vs/workbench/services/treeSitter/browser/treeSitterTokenizationFeature.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,8 @@ export class TreeSitterTokenizationSupport extends Disposable implements ITreeSi
566566
if (position !== undefined) {
567567
let oldBracket = endOffsetsAndScopes[position].bracket;
568568
// Check that the previous token ends at the same point that the current token starts
569-
if ((position > 0) && (endOffsetsAndScopes[position - 1].endOffset !== startOffset)) {
569+
const prevEndOffset = position > 0 ? endOffsetsAndScopes[position - 1].endOffset : 0;
570+
if (prevEndOffset !== startOffset) {
570571
let preInsertBracket: number[] | undefined = undefined;
571572
if (oldBracket && oldBracket.length > 0) {
572573
preInsertBracket = [];

0 commit comments

Comments
 (0)