mirror of
https://github.com/microsoft/vscode.git
synced 2026-09-19 18:14:50 +01:00
Adresses #149130 by not causing and endless-loop when token end-offsets are not sorted.
This commit is contained in:
@@ -199,7 +199,7 @@ class NonPeekableTextBufferTokenizer {
|
||||
|
||||
const endOffset = lineTokens.getEndOffset(this.lineTokenOffset);
|
||||
// Is there a bracket token next? Only consume text.
|
||||
if (containsBracketType && isOther && endOffset !== this.lineCharOffset) {
|
||||
if (containsBracketType && isOther && this.lineCharOffset < endOffset) {
|
||||
const languageId = lineTokens.getLanguageId(this.lineTokenOffset);
|
||||
const text = this.line.substring(this.lineCharOffset, endOffset);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user