Change:
Keeping this open as the main tracking issue as I keep an eye on error telemetry. Been quiet and haven't seen any entries in the errors site since early Feb with +
Closing this as fixed by the above linked PR's. Error telem has been quiet with no entries for ~4 weeks.

Discussion:
this._onPositionChanged(e); })); <ins> this.toUnhook.add(editor.onDidFocusEditorText((e) => { if (!this.workerRequest) { this._run(); } })); </ins> this.toUnhook.add(editor.onDidChangeModelContent((e) => { this._stopAll(); }));

if (editorHighlighterContrib.wordHighlighter.decorations.length > 0) { editorHighlighterContrib.wordHighlighter.decorations.clear(); <ins> editorHighlighterContrib.wordHighlighter.workerRequest = null; </ins> editorHighlighterContrib.wordHighlighter._hasWordHighlights.set(false); } }

if (this.editor.hasTextFocus()) { if (this.editor.getModel()?.uri.scheme !== Schemas.vscodeNotebookCell && WordHighlighter.query?.modelInfo?.model.uri.scheme !== Schemas.vscodeNotebookCell) { // clear query if focused non-nb editor WordHighlighter.query = null; <del> this._run(); </del> <ins> this._run(); // TODO: @Yoyokrazy -- investigate why we need a full rerun here. likely addressed a case/patch in the first iteration of this feature </ins> } else { // remove modelInfo to account for nb cell being disposed if (WordHighlighter.query?.modelInfo) { WordHighlighter.query.modelInfo = null;

private _run(): void { let workerRequestIsValid; <del> if (!this.editor.hasTextFocus()) { // no focus (new nb cell, etc) if (WordHighlighter.query === null) { // no previous query, nothing to highlight </del> <ins> const hasTextFocus = this.editor.hasTextFocus(); if (!hasTextFocus) { // new nb cell scrolled in, didChangeModel fires if (!WordHighlighter.query) { // no previous query, nothing to highlight off of </ins> return; } <del> } else { </del> <ins> } else { // has text focus </ins> const editorSelection = this.editor.getSelection(); // ignore multiline selection if (!editorSelection || editorSelection.startLineNumber !== editorSelection.endLineNumber) { <ins> WordHighlighter.query = null; </ins> this._stopAll(); return; }

const otherModelsToHighlight = this.getOtherModelsToHighlight(this.editor.getModel()); <del> // 2 cases where we want to send the word // a) there is no stored query model, but there is a word. This signals the editor that drove the highlight is disposed (cell out of viewport, etc) // b) the queried model is not the current model. This signals that the editor that drove the highlight is still in the viewport, but we are highlighting a different cell // otherwise, we send null in place of the word, and the model and selection are used to compute the word // TODO: @Yoyokrazy -- investigate this logic for sendWord const sendWord = (!WordHighlighter.query.modelInfo && WordHighlighter.query.word) || (WordHighlighter.query.modelInfo?.model.uri !== this.model.uri) ? true : false; if (!WordHighlighter.query.modelInfo || (WordHighlighter.query.modelInfo.model.uri !== this.model.uri)) { // use this.model this.workerRequest = this.computeWithModel(this.model, this.editor.getSelection(), sendWord ? WordHighlighter.query.word : null, otherModelsToHighlight); } else { // use stored query model + selection this.workerRequest = this.computeWithModel(WordHighlighter.query.modelInfo.model, WordHighlighter.query.modelInfo.selection, WordHighlighter.query.word, otherModelsToHighlight); </del> <ins> // when reaching here, there are two possible states. // 		1) we have text focus, and a valid query was updated. // 		2) we do not have text focus, and a valid query is cached. // the query will ALWAYS have the correct data for the current highlight request, so it can always be passed to the workerRequest safely if (!WordHighlighter.query.modelInfo || WordHighlighter.query.modelInfo.model.isDisposed()) { return; </ins> } <ins> this.workerRequest = this.computeWithModel(WordHighlighter.query.modelInfo.model, WordHighlighter.query.modelInfo.selection, WordHighlighter.query.word, otherModelsToHighlight); </ins> this.workerRequest?.result.then(data => { if (myRequestId === this.workerRequestTokenId) {