[vim] v:shell_error can change around redraw!

Patch suggested by Mariusz Atamańczuk
This commit is contained in:
Junegunn Choi 2016-07-28 01:41:11 +09:00
parent f787f7e651
commit d6a99c0391
No known key found for this signature in database
GPG Key ID: 254BC280FEF9C627

View File

@ -348,8 +348,9 @@ function! s:execute(dict, command, temps) abort
let command = escaped
endif
execute 'silent !'.command
let exit_status = v:shell_error
redraw!
return s:exit_handler(v:shell_error, command) ? s:collect(a:temps) : []
return s:exit_handler(exit_status, command) ? s:collect(a:temps) : []
endfunction
function! s:execute_tmux(dict, command, temps) abort
@ -360,8 +361,9 @@ function! s:execute_tmux(dict, command, temps) abort
endif
call system(command)
let exit_status = v:shell_error
redraw!
return s:exit_handler(v:shell_error, command) ? s:collect(a:temps) : []
return s:exit_handler(exit_status, command) ? s:collect(a:temps) : []
endfunction
function! s:calc_size(max, val, dict)