Skip to content

Commit

Permalink
Fix restoration of g:gitgutter_enabled after :vimgrep
Browse files Browse the repository at this point in the history
  • Loading branch information
airblade committed Sep 7, 2021
1 parent 832f7c6 commit 256702d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugin/gitgutter.vim
Original file line number Diff line number Diff line change
Expand Up @@ -296,8 +296,8 @@ augroup gitgutter
autocmd ColorScheme * call gitgutter#highlight#define_highlights()

" Disable during :vimgrep
autocmd QuickFixCmdPre *vimgrep* let g:gitgutter_enabled = 0
autocmd QuickFixCmdPost *vimgrep* let g:gitgutter_enabled = 1
autocmd QuickFixCmdPre *vimgrep* let [g:gitgutter_was_enabled, g:gitgutter_enabled] = [g:gitgutter_enabled, 0]
autocmd QuickFixCmdPost *vimgrep* let g:gitgutter_enabled = g:gitgutter_was_enabled | unlet g:gitgutter_was_enabled
augroup END

" }}}
Expand Down

0 comments on commit 256702d

Please sign in to comment.