From f04a2275dbe525df5e0a4dcdfb368d768850f8dd Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Wed, 21 Aug 2019 15:09:30 -0500 Subject: [PATCH] Remove feedkeys() contortions in :Gdiffsplit Closes https://github.com/tpope/vim-fugitive/issues/1313 --- autoload/fugitive.vim | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index d09e6a0..b012f20 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -4537,9 +4537,8 @@ function! s:Diff(autodir, keepfocus, mods, ...) abort let w:fugitive_diff_restore = restore let winnr = winnr() if getwinvar('#', '&diff') - exe back - if !a:keepfocus - call feedkeys(winnr."\w", 'n') + if a:keepfocus + exe back endif endif return post