From 933f6a1e1df549564062f936bd1c836d28cf1676 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Mon, 26 Jan 2015 01:16:31 +0100 Subject: [PATCH] s:Diff: use winnr with `w` instead of `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 --- plugin/fugitive.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim index c880351..65e6665 100644 --- a/plugin/fugitive.vim +++ b/plugin/fugitive.vim @@ -1759,7 +1759,7 @@ function! s:Diff(vert,...) abort let winnr = winnr() if getwinvar('#', '&diff') wincmd p - call feedkeys("\p", 'n') + call feedkeys(winnr."\w", 'n') endif return '' catch /^fugitive:/