Fixes pasting into quick outline does not reveal result
Fixes #166687
@jeanp413 Does this not feel too jumpy now with this change? Also, can you resolve the merge conflict?
@TylerLeonhardt from my tests it's the same behavior as before, did you found a case where that's not the case?
The behavior is different when you type now. So using the similar steps as the issue:
Steps:
- open native host main service
- type "s" and then "e" and then "n"
Previous behavior: only when n is hit will it jump in the editor
Your PR behavior: first keypress it will jump in the editor
I found this PR by @jrieken which actually bumped that from 1 to 2: https://github.com/microsoft/vscode/pull/154247/files
Maybe he could chime in on this.
I wonder if a solution of "don't jump unless we have at least 3 characters in the query" would be a better mechanism. I believe that was the true intent of the code initially.
Ah I see what you mean, but is it intended to ignore single letters symbols (I could name a method or variable with a single character and should be able to jump to them automatically)? I also found the PR you mention while investigating this but that was meant to be implement automatically show the select item under cursor, so maybe the behavior you describe was an unintended side effect :thinking:
Let's see if @jrieken can give us context. I guess I technically own this but I wanna get some historical context.
Let's see if @jrieken can give us context. I guess I technically own this but I wanna get some historical context.
I didn't introduce this concept, just bumped the number of 1 to 2 because with automatic revealing there are now two events. I guess the logic (which I believe originates with @bpasero) is that quick outline shouldn't immediately highlight an item (yellow'ish background) but wait for the first real input
Also, not that this doesn't reproduce when there is something to reveal (at the time of opening QP) so I guess the right fix is to ignore 1 or 2 events depending on the presence of positionToEnclose
the right fix is to ignore 1 or 2 events
That's what { itemActivation: ItemActivation.NONE } does internally