vscode-git-graph icon indicating copy to clipboard operation
vscode-git-graph copied to clipboard

Select previous search text when reopening search box

Open L0PiTaL opened this issue 3 years ago • 0 comments

Describe the improvement that you'd like When using the "normal" search box of vscode, you can do the following sequence:

Ctrl + F -> Opens search box
Write whatever to search
Ctrl + F -> Refocus search box AND selects all the search text [1]
Write any other thing [2]

The effect in [2] is that the previous text is erased (because it was selected in the previous step) and the new search text is written.

Note that the selection of the search text happens in both: when [1] is pressed inside the search box or when it is pressed from any other part of the window. Every time Ctrl + F is pressed, the search text is selected.

This does not happen in the git graph search box. Opening the search box via shortcut does not select the previous text, so the resulting string is:

Whatever was previously + New things

which is not what was intended to be searched.

Also, with this change it would provide a consistent behavior with the vscode search box.

L0PiTaL avatar Jan 28 '22 08:01 L0PiTaL