Also use the first line which has a begin state when tokenizing the viewport (#155698)

This commit is contained in:
Alexandru Dima 2022-07-20 12:04:01 +02:00 committed by GitHub
parent abf921bd9c
commit c79556aed3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -472,12 +472,12 @@ export class TextModelTokenization extends Disposable {
}
if (newNonWhitespaceIndex < nonWhitespaceColumn) {
fakeLines.push(this._textModel.getLineContent(i));
nonWhitespaceColumn = newNonWhitespaceIndex;
initialState = this._tokenizationStateStore.getBeginState(i - 1);
if (initialState) {
break;
}
fakeLines.push(this._textModel.getLineContent(i));
nonWhitespaceColumn = newNonWhitespaceIndex;
}
}