commit eeaadf725588f0d3974df3fc0ce1ccc370d513cd (tree)
parent 65be0ae749396697065fff2cbdb97f14c42242fc
Author: Tim Pope <code@tpope.net>
Date: Sun, 27 May 2018 15:18:57 -0400
Fix off by one error
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim
@@ -1431,7 +1431,7 @@ function! s:Edit(cmd,bang,...) abort
if &previewwindow && getbufvar('','fugitive_type') ==# 'index'
let winnrs = filter([winnr('#')] + range(1, winnr('$')), 's:UsableWin(v:val)')
if len(winnrs)
- exe winnrs[1].'wincmd w'
+ exe winnrs[0].'wincmd w'
elseif winnr('$') == 1
let tabs = (&go =~# 'e' || !has('gui_running')) && &stal && (tabpagenr('$') >= &stal)
execute 'rightbelow' (&lines - &previewheight - &cmdheight - tabs - 1 - !!&laststatus).'new'