Skip to content

Commit

Permalink
Restore v:shell_error in autocmd ShellCmdPost
Browse files Browse the repository at this point in the history
  • Loading branch information
nkouevda committed Aug 31, 2023
1 parent 5f52547 commit a5e0740
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion plugin/gitgutter.vim
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,11 @@ augroup gitgutter
" vim -o file1 file2
autocmd VimEnter * if winnr() != winnr('$') | call gitgutter#all(0) | endif

autocmd ShellCmdPost * call gitgutter#all(1)
autocmd ShellCmdPost *
\ let s:prev_shell_error = v:shell_error |
\ call gitgutter#all(1) |
\ silent! execute '!exit ' .. s:prev_shell_error |
\ redraw!
autocmd BufLeave term://* call gitgutter#all(1)

autocmd User FugitiveChanged call gitgutter#all(1)
Expand Down

0 comments on commit a5e0740

Please sign in to comment.