mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-13 05:43:52 -05:00
Work around Vim issue with hidden diff window
If you call :Gdiff on a file that's also open in a separate tab, close it, switch to another file, and call :Gdiff again, Vim thinks the first file is part of a 3-way diff, despite no longer being displayed in a window. Curiously, :diffoff! seems to work around this, despite both the documentation and source code suggesting it merely iterates over open windows. Closes https://github.com/tpope/vim-fugitive/issues/534
This commit is contained in:
@@ -1391,6 +1391,7 @@ function! s:Edit(cmd,bang,...) abort
|
||||
endif
|
||||
endif
|
||||
endfor
|
||||
diffoff!
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
Reference in New Issue
Block a user