Skip to content

Commit

Permalink
Fix redraw clobbering return code
Browse files Browse the repository at this point in the history
The `redraw!` command can sometimes clobber `v:shell_error`. Moving the
call later prevents this happening.
  • Loading branch information
brookst committed Jan 16, 2017
1 parent 8cb1d3d commit 1ba6a5f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions plugin/skim.vim
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ try
endif

let lines = tmux ? s:execute_tmux(dict, command, temps) : s:execute(dict, command, temps)
redraw!
call s:callback(dict, lines)
return lines
finally
Expand Down Expand Up @@ -256,7 +257,6 @@ function! s:execute(dict, command, temps) abort
let command = escaped
endif
execute 'silent !'.command
redraw!
return s:exit_handler(v:shell_error, command) ? s:collect(a:temps) : []
endfunction

Expand All @@ -268,7 +268,6 @@ function! s:execute_tmux(dict, command, temps) abort
endif

call system(command)
redraw!
return s:exit_handler(v:shell_error, command) ? s:collect(a:temps) : []
endfunction

Expand Down

0 comments on commit 1ba6a5f

Please sign in to comment.