VSCodeVim / Vim

:star: Vim for Visual Studio Code
http://aka.ms/vscodevim
MIT License
14.01k stars 1.32k forks source link

When searching: copy+paste clipboard operations inconsistent, can't middle click to paste on Linux #9265

Open gentlelovebear opened 2 months ago

gentlelovebear commented 2 months ago

Description

Hey folks!

Currently, copying + pasting text into the text search ('Esc + /') box is a little inconsistent.

To get text into the box, you must:

So you can highlight text and right click to copy, but you can't right click the box and click 'Paste' to paste (since there is no 'Paste' option in the context menu that appears).

So if you're primarily using mouse, you have to switch back and forth between 'select with mouse' and 'paste with keyboard', and remember in which context each one works.

Also, on Linux, beside the clipboard (used when copying paste with 'Ctrl + C' etc), there is the "select buffer", where highlighted text is automatically copied into, and can be pasted into text fields with a middle mouse click.

Using the clipboard and select buffer together allows for some fairly advanced workflow, where different (but related) values can be saved in both buffers and used independently. However, pasting with middle click does not appear to be supported in this context either (it is supported in the normal editing mode).

To Reproduce

1) Highlight text you wish to search for (this copies into the 'middle click to paste/select' buffer on Linux) 2) Hit the '/' key to open the text search box at the bottom of the page. 3) Middle click, hoping against all hope that this time it will paste text into it. 4) Go back and right-click on the highlighted text and click 'copy'. 5) Hit the '/' key to open the text search box. 6) Right click and get confused by the lack of a 'Paste' option. 7) Remember that you have to use 'Ctrl + V' to paste.

Expected Behavior

Ideally, we should be able to paste text into the 'Esc + /' search box via any of:

Screenshots

Here are two screenshots:

1) an editor with no search active: cider_v_no_search_active

2) an editor with a search active (i.e. after hitting 'Esc' then '/'), right clicking into the search box and not seeing 'Paste': cider_v_search_no_right_click_paste

It's kind of hard to show the 'select buffer + middle click' behavior not working, but just imaging middle clicking into the search field from screenshot #2 and having nothing happen.

Environment

Additional context

I really love this extension! Thank you all for your hard work providing this great tool.