diff options
author | Alexandru Dima <alexdima@microsoft.com> | 2022-07-20 13:04:01 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-20 13:04:01 +0300 |
commit | c79556aed38346a6d5f515d5006345c49777b313 (patch) | |
tree | 2e32cf3b4007d5470844df94eca82104d30e78ec /src | |
parent | abf921bd9cce74a881608b93b76b5617251af82a (diff) |
Also use the first line which has a begin state when tokenizing the viewport (#155698)
Diffstat (limited to 'src')
-rw-r--r-- | src/vs/editor/common/model/textModelTokens.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vs/editor/common/model/textModelTokens.ts b/src/vs/editor/common/model/textModelTokens.ts index b504fc14366..120da61f3f5 100644 --- a/src/vs/editor/common/model/textModelTokens.ts +++ b/src/vs/editor/common/model/textModelTokens.ts @@ -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; } } |