From c99ad921c8528683c1f08ec011c542ee1b937e77 Mon Sep 17 00:00:00 2001 From: Shidong Wang Date: Sat, 2 Jan 2021 19:46:39 +0800 Subject: [PATCH] fix defx configuration --- config/plugins/defx.vim | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/config/plugins/defx.vim b/config/plugins/defx.vim index 9cf8dd64b..411d752b5 100644 --- a/config/plugins/defx.vim +++ b/config/plugins/defx.vim @@ -253,7 +253,7 @@ function! s:DefxCopyFile(_) abort endfunction function! s:DefxPasteFile(_) abort - if !executable('xclip-copyfile') && !s:SYS.isWindows + if !executable('xclip-pastefile') && !s:SYS.isWindows echohl WarningMsg echo 'you need to have xclip-copyfile in your PATH' echohl NONE @@ -279,13 +279,13 @@ function! s:DefxPasteFile(_) abort let destination = path . s:FILE.separator . fnamemodify(s:copyed_file_path, ':t') let cmd = 'cmd /c copy ' . shellescape(s:copyed_file_path) . ' ' . shellescape(destination) call s:VCOP.systemlist(cmd) - if v:shell_error - echohl WarningMsg - echo 'failed to paste file!' - echohl NONE - else - echo 'Pasted:' . destination - endif + endif + if v:shell_error + echohl WarningMsg + echo 'failed to paste file!' + echohl NONE + else + echo 'Pasted:' . destination endif endfunction