Skip to content

Commit

Permalink
disposed model check (microsoft#197108)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yoyokrazy committed Nov 1, 2023
1 parent b45119e commit 527ccb6
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -533,6 +533,10 @@ class WordHighlighter {
const lineNumber = editorSelection.startLineNumber;
const startColumn = editorSelection.startColumn;

if (this.model.isDisposed()) {
return null;
}

return this.model.getWordAtPosition({
lineNumber: lineNumber,
column: startColumn
Expand Down

0 comments on commit 527ccb6

Please sign in to comment.