1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-23 13:00:04 +08:00

Add warning message (#4040)

when failed to run xclip-copyfile, no warning message is shown.
This commit is contained in:
Wang Shidong 2021-01-02 20:40:32 +08:00 committed by GitHub
parent c99ad921c8
commit f8165cd9dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -246,10 +246,17 @@ function! s:DefxCopyFile(_) abort
if executable('xclip-copyfile') if executable('xclip-copyfile')
call s:VCOP.systemlist(['xclip-copyfile', filename]) call s:VCOP.systemlist(['xclip-copyfile', filename])
if v:shell_error
echohl WarningMsg
echo 'failed to copy file!'
echohl NONE
else
echo 'Yanked:' . filename
endif
elseif s:SYS.isWindows elseif s:SYS.isWindows
let s:copyed_file_path = filename let s:copyed_file_path = filename
echo 'Yanked:' . filename
endif endif
echo 'Yanked:' . filename
endfunction endfunction
function! s:DefxPasteFile(_) abort function! s:DefxPasteFile(_) abort