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: c99f0ff06b (commitcomment-9434351)
This commit is contained in:
Daniel Hahler
2015-01-26 01:16:31 +01:00
committed by Tim Pope
parent 34719016ec
commit 933f6a1e1d

View File

@@ -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:/