Change:
Type: <bBug</bI have occurrences highlight and selection highlight turned off. At a seemingly random moment, a buggy form of occurrence highlighting started to happen, so that whatever word my cursor was on when navigating to an instance of VSCode, that word and all occurrences of it became highlighted, and that highlighting would not go away. Moving the cursor did not change the previous highlighting, and navigating to different tabs or instances did not change it either. Quitting the application and opening again did not fix the problem. ! VS Code version: Code 1.87.0 (Universal) (, 2024-02-27T23:42:56.944Z) OS version: Darwin arm64 23.3.0 Modes: <details<summarySystem Info</summary </details<details<summaryExtensions (16)</summaryExtensionVersion ------ rtf2.7.0 auto-add-brackets0.12.2 character-highlighter0.0.2 selected-lines-count1.4.0 rainbow-csv3.11.0 dotenv1.0.1 ruby-rubocop0.8.6 block-travel0.0.2 ruby-lsp0.5.11 open-in-browser2.0.0 pdf1.2.2 sort-lines1.11.0 gitblame10.9.0 vscode-ruby0.28.0 change-case1.0.0 current-file-path4.0.0 (2 theme extensions excluded) </details<details<summaryA/B Experiments</summary</details<!-- generated by issue reporter --
Some more information regarding this issue: I have also started encountering this issue, can confirm the issue still exists after disabling all extensions. My occurrence highlighting setting is also turned off and it seems that this setting is what is causing the issue after updating to the latest version of vs code. This issue did not exist prior to the most recent version. If you have editor groups split side by side, and move to the right editor group, then back to the left editor group, the "stuck occurrence highlighting" issue occurs where the cursor was previously. Typing/backspacing the selection will temporarily fix this issue until it happens again. Hope this helps
Same here
You're not alone. I am hitting this issue as well. This started in the Feb 2024 version and exists with all extensions disabled. Rolling back to the Jan 2024 issue fixes it for me (but then Copilot can no longer be enabled). I am temporarily working around the issue by by making the highlight color invisible in my Now the only thing that's annoying is the scrollbar markers, but I can live with that until this is fixed.
I'm experiencing the same. I had turned off so I've noticed it immediately after update, but now I've enabled it temporarily just so it will be less annoying and not get stuck.
! Same here. No A/B experiments.
Same here. Other seemingly related issues:
The latest insiders build is verified to have this fixed, and the fix is coming as well in the stable recovery release 1.87.1
When can we expect a release with the fix? I can't code with this bug, it's too distracting.
- You can downgrade to 1.86.2 in the meantime - no reason to be on 1.87 while it's broken:
this means uninstalling vscode and then installing 1.86.2?
Related on StackOverflow:
the fix is already shipped to if you would like to continue using other features from . Insiders will receive fixes before the major version is typically able to adopt them. The fix will be coming likely this week with recovery 1.87.1 release.
Related on Stack Overflow:
- Same experiences here. A term will randomly highlight, and will not un-highlight until I make a file change. Then shortly after, either by changing files or just waiting, another random term will highlight, and will not un-highlight. Rinse and repeat. Started a few days ago. I have disabled all extensions, and behavior persists. Here is what I am running: VSCode Version: 1.87.0 or Mac, Apple M1 Pro macOS 14.3.1 Can you pls advise on what to try to fix this behavior?
I just want to say that I was experiencing this long time ago and I never turned off the setting, something isn't working right with occurrence highlight and sometimes it get stuck, not sure why and how. So even though you fixed it by checking if setting is it is going to work only if you turn it off, but most devs keep it on since it's really valuable feature and we will still have the same problem.
If you want to stay on 1.87.0 specifically, setting will enable standard semantic highlighting throughout your workspace which is behaving correctly. This is the behavior that the setting previously covered. The fix for will be coming in the recovery release (version ) which will be released today. If you would like to access the fixed behavior immediately, you can use the insiders edition of VS Code, linked in my comment above. There have been two bugs with occurrences getting "stuck", and both should have been fixed by now (see and ). If you are experiencing issues, please file a bug and feel free to tag me directly and I can get to it. Currently (in the stable release) there should not be issues with "stuck" highlighting while the setting is either or .
- setting fixes the primary issue for me. It does still have some odd behavior, but hard for me to say definitively, b/c I have always had the "Occurrence Highlight" feature set to . Also could be the result of some combination of the other "highlight" related settings. Thanks!
thanks, I will let you know if I hit the issue again.

Discussion:
this._onPositionChanged(e); })); this.toUnhook.add(editor.onDidFocusEditorText((e) => { <ins> if (this.occurrencesHighlight === 'off') { // Early exit if nothing needs to be done return; } </ins> if (!this.workerRequest) { this._run(); }