Trigger OptionSet on automatic :diffoff

Closes https://github.com/tpope/vim-fugitive/issues/1545
This commit is contained in:
Tim Pope
2020-05-31 00:49:36 -04:00
parent 03fa78141e
commit 27a5c3abd2

View File

@@ -4817,11 +4817,11 @@ endfunction
augroup fugitive_diff
autocmd!
autocmd BufWinLeave *
autocmd BufWinLeave * nested
\ if s:can_diffoff(+expand('<abuf>')) && s:diff_window_count() == 2 |
\ call s:diffoff_all(s:Dir(+expand('<abuf>'))) |
\ endif
autocmd BufWinEnter *
autocmd BufWinEnter * nested
\ if s:can_diffoff(+expand('<abuf>')) && s:diff_window_count() == 1 |
\ call s:diffoff() |
\ endif