From 6f3cb22c1055cba473ecfff519b66636c4076b70 Mon Sep 17 00:00:00 2001 From: Marco Hinz Date: Fri, 19 Jul 2013 22:09:25 +0200 Subject: [PATCH] Don't decrement s:numfiles This worked for the startup, but messed up calling :Startify, because s:numfiles was down to 0. --- autoload/startify.vim | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/autoload/startify.vim b/autoload/startify.vim index 38eb9eb..76ba276 100644 --- a/autoload/startify.vim +++ b/autoload/startify.vim @@ -228,6 +228,7 @@ endfunction " Function: s:show_files {{{1 function! s:show_files(cnt) abort let cnt = a:cnt + let num = s:numfiles let entries = {} if s:show_special || s:show_dir call append('$', '') @@ -246,8 +247,8 @@ function! s:show_files(cnt) abort call append('$', ' ['. index .']'. repeat(' ', (3 - strlen(index))) . fname) execute 'nnoremap ' index ':edit' fnameescape(fname) s:cmd let cnt += 1 - let s:numfiles -= 1 - if !s:numfiles + let num -= 1 + if !num break endif endfor