microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
164.52k stars 29.39k forks source link

Quickly entering a query into quick search and opening the view can leave stale entries in the search view #227600

Open Tyriar opened 2 months ago

Tyriar commented 2 months ago

Repro:

  1. Windows
  2. keybinding: { "key": "ctrl+shift+f", "command": "workbench.action.quickTextSearch" },
  3. copy vs/base/common/lifecycle
  4. Ctrl+shift+f
  5. Quickly type: ', then ctrl+v, then tab, then enter, 🐛 stale search entries will show in the view

Image

andreamah commented 2 months ago

Hmm, I'm having trouble repro-ing. What are the stale entries from? A previous search?

Tyriar commented 2 months ago

They're from the initial ' search:

Image

So there's a race condition that doesn't invalidate them when more is typed and new search results come in

andreamah commented 2 months ago

Hmm, I can't seem to repro, but I can take a look into what might be causing it.