When searching: copy+paste clipboard operations inconsistent, can't middle click to paste on Linux
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 15.2k
- Forks
- 1.5k
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 6
Description
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:
- Select text with the mouse
- 'Ctrl + C' or right click and click 'Copy' from the context menu
- Hit 'Est + '/ to open search box
- Hit 'Ctrl + v' to paste (no right click + 'Paste' option)
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
- Highlight text you wish to search for (this copies into the 'middle click to paste/select' buffer on Linux)
- Hit the '/' key to open the text search box at the bottom of the page.
- Middle click, hoping against all hope that this time it will paste text into it.
- Go back and right-click on the highlighted text and click 'copy'.
- Hit the '/' key to open the text search box.
- Right click and get confused by the lack of a 'Paste' option.
- 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:
-
Highlighting, hitting Ctrl + C, navigating to search box and hitting Ctrl + V (currently works)
-
Highlighting, right clicking and clicking 'Copy', opening search box and, right clicking and having the option to click 'Paste'
-
(On Linux) Highlighting text in the editor, opening the search box, then middle clicking into the search box
Screenshots
Here are two screenshots:
-
an editor with no search active:
-
an editor with a search active (i.e. after hitting 'Esc' then '/'), right clicking into the search box and not seeing '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
- URL: https://cider-v.corp.google.com/?ws=ttucker/vim_plugin_search_bug&sid=9b13d705-67bf-45d0-b14a-d83ccc943993
- VS Code Version: 1.92.2
- Cider Version: code.cider-v-frontend_20240912.01_p0, cl/673695786
- User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36
- Platform: Linux x86_64
- Workspace: ttucker/7604 (piper) snapshot 7
- Active Editor: experimental/copy_paste_bug.md line 2 column 71 (markdown)
- Cider Connector: Cider Connector version 0.24248.635 (prod: 2024-09-04 06:35:04 @ cl/670833228)
- LSP Session ID: 3q9oxk9wwbrbwr4d7imxvz9tv
- LSP Session Logs: http://cider-holmes/session?sessionID=3q9oxk9wwbrbwr4d7imxvz9tv
- LSP Hub URL: https://3.prod.cider-lsp-hub.code-cider-lsp-hub.ja.borg.google.com
- LSP Build Label: code.cider-lsp-hub_20240913.03_p0
- LSP Sync Event: {"fileStatuses":{"/google/src/cloud/ttucker/vim_plugin_search_bug/experimental/copy_paste_bug.md":{"kind":1,"statusMessage":"Ready"}},"cell":"ja","buildWorker":"http:///bns/jf/borg/jf/bns/code-cider-build/prod.cider-build/2"}
- Display Mode: browser
- Active Cider Extensions: blaze ciderkernel cldialog codesearch critique feedback lsp piper sourcecontrolapi
- Active VS Code Extensions: none
- Active Third Party Extensions: none
- Enabled Cider Features: CiderSandboxNonModel__variant3, CiderSandboxNonModel__variant4, CodeCompletionRace__persist_ghosted_text, MlppCompletionFilterRepetition__enabled, MlppCompletionHighLatency__enabled, MlppCompletionOnlySingleLine__enabled, ServerPlatformCreateTooltips__enabled, ServerPlatformPodTooltips__enabled, ServerPlatformSimplifyTurnup__enabled, SmartPaste__enabled, TransformCodeEntrypoints__code_action_enabled, enable_batch_file_states, enable_clearcut_logging, enable_code_examples, enable_file_write_event, enable_multiple_hosts, enable_parallel_prefetch, enable_sporedrive_in_analysis_ext, enable_trusted_types_and_csp_in_notebooks, enable_upstream_inline_completion, skip_inline_completion_middleware, start_in_iframe
- Enabled Mendel Experiments: 71820714, 94341423, 94811271, 94890871, 101370525, 101370528, 101385020, 101430258, 101430261
- Enabled Extension Flags: google.blaze: enable_mount_build_output
google.cldialog: enable_cldialog_automatic_cl_description, enable_cldialog_automatic_cl_description_enhanced
google.feedback: use_safe_html, call_fe_for_create, take_screenshot
google.lsp: local_lsp_remote_builds, local_lsp_pin_citc_snapshot, enable_lsp_status2
Additional context
I really love this extension! Thank you all for your hard work providing this great tool.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No file or test is named. First reproduce the Esc + / search-box behavior on Linux, including right-click Paste and middle-click selection-buffer paste, then trace the search input entry point and its editing behavior. Done means all listed paste methods work consistently without breaking normal editor paste behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- linux, typescript, vscode
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100