mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-12 13:23:52 -05:00
(Re)store the current window in s:diffoff_all
This is required to make Vim execute the "Enter" autocommands when closing the fugitive window. Fixes: https://github.com/tpope/vim-fugitive/issues/421
This commit is contained in:
@@ -1681,6 +1681,7 @@ function! s:diffoff() abort
|
||||
endfunction
|
||||
|
||||
function! s:diffoff_all(dir) abort
|
||||
let curwin = winnr()
|
||||
for nr in range(1,winnr('$'))
|
||||
if getwinvar(nr,'&diff')
|
||||
if nr != winnr()
|
||||
@@ -1692,6 +1693,7 @@ function! s:diffoff_all(dir) abort
|
||||
endif
|
||||
endif
|
||||
endfor
|
||||
execute curwin.'wincmd w'
|
||||
endfunction
|
||||
|
||||
function! s:buffer_compare_age(commit) dict abort
|
||||
|
||||
Reference in New Issue
Block a user