[vim] Fix callback not run on exit code 1

This commit is contained in:
Junegunn Choi 2024-08-23 19:35:25 +09:00
parent cf2242aea3
commit 74f196eebb
No known key found for this signature in database
GPG Key ID: 254BC280FEF9C627

View File

@ -727,7 +727,7 @@ function! s:execute(dict, command, use_height, temps) abort
let exit_status = v:shell_error
redraw!
let lines = s:collect(a:temps)
return s:exit_handler(a:dict, exit_status, command) == 0 ? lines : []
return s:exit_handler(a:dict, exit_status, command) < 2 ? lines : []
endfunction
function! s:execute_tmux(dict, command, temps) abort
@ -742,7 +742,7 @@ function! s:execute_tmux(dict, command, temps) abort
let exit_status = v:shell_error
redraw!
let lines = s:collect(a:temps)
return s:exit_handler(a:dict, exit_status, command) == 0 ? lines : []
return s:exit_handler(a:dict, exit_status, command) < 2 ? lines : []
endfunction
function! s:calc_size(max, val, dict)
@ -908,7 +908,7 @@ function! s:execute_term(dict, command, temps) abort
endif
let lines = s:collect(self.temps)
if s:exit_handler(self.dict, a:code, self.command, 1) != 0
if s:exit_handler(self.dict, a:code, self.command, 1) >= 2
return
endif