mirror of
https://github.com/neovim/neovim.git
synced 2025-10-21 09:12:07 +00:00
win,runtime: Fix problem when win32yank was a symbolic link in WSL [skip ci] (#12124)
On some versions of Windows, WSL is unable to execute symbolic links to Windows executables (microsoft/WSL#3999). As a workaround for that problem this changes to use resolve() on WSL if win32yank was a symbolic link. fixes #12113.
This commit is contained in:
@@ -113,8 +113,13 @@ function! provider#clipboard#Executable() abort
|
|||||||
let s:paste['*'] = s:paste['+']
|
let s:paste['*'] = s:paste['+']
|
||||||
return 'doitclient'
|
return 'doitclient'
|
||||||
elseif executable('win32yank.exe')
|
elseif executable('win32yank.exe')
|
||||||
let s:copy['+'] = 'win32yank.exe -i --crlf'
|
if has('wsl') && getftype(exepath('win32yank.exe')) == 'link'
|
||||||
let s:paste['+'] = 'win32yank.exe -o --lf'
|
let win32yank = resolve(exepath('win32yank.exe'))
|
||||||
|
else
|
||||||
|
let win32yank = 'win32yank.exe'
|
||||||
|
endif
|
||||||
|
let s:copy['+'] = win32yank.' -i --crlf'
|
||||||
|
let s:paste['+'] = win32yank.' -o --lf'
|
||||||
let s:copy['*'] = s:copy['+']
|
let s:copy['*'] = s:copy['+']
|
||||||
let s:paste['*'] = s:paste['+']
|
let s:paste['*'] = s:paste['+']
|
||||||
return 'win32yank'
|
return 'win32yank'
|
||||||
|
Reference in New Issue
Block a user