Skip to content

Commit efe237d

Browse files
committed
ensure there are token before asking for the word at a position, fixes microsoft#32756
1 parent 4a21980 commit efe237d

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/vs/editor/contrib/suggest/browser/suggestModel.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ export class LineContext {
3939
return false;
4040
}
4141
const pos = editor.getPosition();
42+
model.tokenizeIfCheap(pos.lineNumber);
4243
const word = model.getWordAtPosition(pos);
4344
if (!word) {
4445
return false;

0 commit comments

Comments
 (0)