New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pasting from Windows clipboard to Ubuntu WSL terminal freezes nvim #20396
Comments
What keys exactly did you use? Is it the system paste, i.e. ctrl-shift-v or ctrl-v ? |
Right click -> Pasting https://i.imgur.com/WiWjuK8.png Ctrl+shift+v paste works fine. In 0.6.1 right click paste works. |
Does pressing "+gP crash? |
Yes |
Also it's not crashing, it just freezes for a good ~1 minute, and then does not paste the output. I checked if it was anything in my init.vim, but it occurs even with an empty file. |
Are you using Window Terminal and xclip? I had the same issues before, terminal randomly freezes when pasting from windows to WSL2 |
I reproduced this in |
Could you try the suggestion given by |
Yep, it works, but it's very slow. Doesn't seem like a good solution. Having By the way, I had to convert the suggestion to vim.g.clipboard = {
name = 'WslClipboard',
copy = {
['+'] = 'clip.exe',
['*'] = 'clip.exe',
},
paste = {
['+'] = 'powershell.exe -c [Console]::Out.Write($(Get-Clipboard -Raw).tostring().replace("`r", ""))',
['*'] = 'powershell.exe -c [Console]::Out.Write($(Get-Clipboard -Raw).tostring().replace("`r", ""))',
},
cache_enabled = 0,
} My environment: wsl --version
WSL version: 1.1.3.0
Kernel version: 5.15.90.1
WSLg version: 1.0.49
MSRDC version: 1.2.3770
Direct3D version: 1.608.2-61064218
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.19042.2604
uname -a
Linux W109WWSD33 5.15.90.1-microsoft-standard-WSL2 #1 SMP Fri Jan 27 02:56:13 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
nvim --version
NVIM v0.8.4-dev-2+gb1ae775de
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
Compilation: /usr/bin/cc -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNVIM_TS_HAS_SET_MATCH_LIMIT -DNVIM_TS_HAS_SET_ALLOCATOR -O2 -g -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wdouble-promotion -Wmissing-noreturn -Wmissing-format-attribute -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=always -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I/home/george/code/hub/neovim/build/cmake.config -I/home/george/code/hub/neovim/src -I/home/george/code/hub/neovim/.deps/usr/include -I/usr/include -I/home/george/code/hub/neovim/build/src/nvim/auto -I/home/george/code/hub/neovim/build/include
Compiled by george@REDACTED
Features: +acl +iconv +tui
See ":help feature-compile"
system vimrc file: "$VIM/sysinit.vim"
fall-back for $VIM: "/usr/local/share/nvim"
Run :checkhealth for more info |
Does win32yank.exe and xsel still works for now? I can confirm the
But again, need to add above configuration to work. My environment:
|
Neovim version (nvim -v)
0.8.0-dev (0.8.0
ubuntu1+git202209280149-e6c214033-c99271b19-d5ad4b253ubuntu18.04.1)Vim (not Nvim) behaves the same?
no, vim 0.6.1
Operating system/version
Ubuntu 18.04.5 (WSL 2)
Terminal name/version
Default Ubuntu terminal from the Microsoft store
$TERM environment variable
xterm-256color
Installation
sudo add-apt-repository ppa:neovim-ppa/unstable
How to reproduce the issue
Paste anything into nvim from windows clipboard
Expected behavior
Paste windows clipboard
Actual behavior
Crashes neovim
The text was updated successfully, but these errors were encountered: