vscode: Unable to paste filenames from Finder
Issue Type: Bug
1 - select a file in Finder 2 - copy the item 3 - paste the item in VSCode
expected result: the filename alone is pasted at the cursor actual result: nothing is pasted (no response at all)
I can right-click and press OPT to “Copy as pathname”, and that bit of text will paste just fine in VSCode. But up until last week I seemed to be able to just copy and paste the filename successfully.
VS Code version: Code 1.66.0 (Universal) (e18005f0f1b33c29e81d732535d8c0e47cafb0b5, 2022-03-30T05:50:04.419Z) OS version: Darwin x64 20.6.0 Restricted Mode: No
System Info
| Item | Value |
|---|---|
| CPUs | Intel® Core™ i9-9980HK CPU @ 2.40GHz (16 x 2400) |
| GPU Status | 2d_canvas: enabled canvas_oop_rasterization: disabled_off direct_rendering_display_compositor: disabled_off_ok gpu_compositing: enabled metal: disabled_off multiple_raster_threads: enabled_on oop_rasterization: enabled opengl: enabled_on rasterization: enabled raw_draw: disabled_off_ok skia_renderer: enabled_on video_decode: enabled video_encode: enabled webgl: enabled webgl2: enabled |
| Load (avg) | 2, 2, 2 |
| Memory (System) | 16.00GB (0.09GB free) |
| Process Argv | –crash-reporter-id 198fce6b-e4ee-44a7-ba81-090ccad03384 |
| Screen Reader | no |
| VM | 0% |
Extensions (21)
| Extension | Author (truncated) | Version |
|---|---|---|
| Bookmarks | ale | 13.2.4 |
| html-entities | chr | 1.1.2 |
| vscode-quick-select | dba | 0.2.9 |
| githistory | don | 0.6.19 |
| gitlens | eam | 12.0.5 |
| permute-lines | ear | 1.1.0 |
| vscode-commands | fab | 1.4.3 |
| auto-close-tag | for | 0.5.14 |
| beautify | Hoo | 1.5.0 |
| easy-snippet | inu | 0.6.3 |
| replace-curly-quotes | jin | 1.1.0 |
| vscode-gutter-preview | kis | 0.30.0 |
| diff-merge | mos | 0.6.1 |
| remote-repositories | ms- | 0.4.0 |
| gremlins | nho | 0.26.0 |
| material-product-icons | PKi | 1.2.0 |
| partial-diff | ryu | 1.4.3 |
| vscode-fileutils | sle | 3.5.0 |
| open-in-browser | tec | 2.0.0 |
| html-validate-vscode | Tob | 0.2.0 |
| vscode-status-bar-format-toggle | tom | 3.0.0 |
(2 theme extensions excluded)
A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
pythonvspyl392:30443607
pythontb:30283811
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
vscoreces:30445986
pythondataviewer:30285071
vscod805cf:30301675
pythonvspyt200:30340761
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593cf:30376535
testflightcf:30433671
vsc1dst:30438360
pythonvs932:30410667
wslgetstarted:30449410
pythonvsnew555:30457759
vscscmwlcmt:30465135
pynewfile477:30463512
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 7
- Comments: 16 (7 by maintainers)
Commits related to this issue
- Fixes #146770: If no text is pasted, but there are files in the clipboard data, generate text from the file names — committed to microsoft/vscode by alexdima 2 years ago
Any progress? Copy-and-paste from Finder files to file names in the VS Code is a great feature. Was using it every day… until it stopped working recently 😦
I have exactly the same problem on linux - partial fix. Has there been a new Issue # registered to get it fixed?
new update partially fixes, in that I can now paste the file/folder name. However, previously I could paste the entire absolute path
After running
vscode-bisect, it looks like this started in this range: https://github.com/microsoft/vscode/compare/f8c36556a2c305327f5417dc7f93220f39ed608f...2d8e93571421d69616e0ed7d7958e32abaf8d7d3 . A manualgit bisectpoints to 01df559c184549248fcfbcecc5a616462e00c252w00t here’s hoping this is fixed in the next release.
Same issue. As a temp workaround:
It is a recent regression, the previous stable did not have this issue. I suspect an electron issue as we seem to be executing just the plain “syscall”
const result = document.execCommand('paste');