mirror of
https://github.com/tpope/vim-fugitive.git
synced 2026-05-04 04:25:52 +08:00
s:Diff: use winnr with <C-W>w instead of <C-W>p
This is more reliable and fixes an issue where the syntastic location list of the original file would be focused after `:Gdiff`. Ref: https://github.com/blueyed/vim-fugitive/commit/c99f0ff06bd1915b2f05c5750283aa9e826ad3d8#commitcomment-9434351
This commit is contained in:
+1
-1
@@ -1759,7 +1759,7 @@ function! s:Diff(vert,...) abort
|
||||
let winnr = winnr()
|
||||
if getwinvar('#', '&diff')
|
||||
wincmd p
|
||||
call feedkeys("\<C-W>p", 'n')
|
||||
call feedkeys(winnr."\<C-W>w", 'n')
|
||||
endif
|
||||
return ''
|
||||
catch /^fugitive:/
|
||||
|
||||
Reference in New Issue
Block a user