mirror of
https://github.com/Llewellynvdm/fzf.git
synced 2024-12-23 11:29:01 +00:00
[vim] handle exit status 1 properly (#359)
This commit is contained in:
parent
86306dd45a
commit
59220c63a6
@ -235,14 +235,13 @@ function! s:execute(dict, command, temps)
|
|||||||
endif
|
endif
|
||||||
execute 'silent !'.command
|
execute 'silent !'.command
|
||||||
redraw!
|
redraw!
|
||||||
if v:shell_error
|
if v:shell_error == 0 || v:shell_error == 1
|
||||||
" Do not print error message on exit status 1 (no match) or 130 (interrupt)
|
return s:callback(a:dict, a:temps)
|
||||||
if index([1, 130], v:shell_error) < 0
|
" Do not print error message on exit status 130 (interrupt)
|
||||||
call s:error('Error running ' . command)
|
elseif v:shell_error == 130
|
||||||
endif
|
|
||||||
return []
|
return []
|
||||||
else
|
else
|
||||||
return s:callback(a:dict, a:temps)
|
call s:error('Error running ' . command)
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user