diff --git a/autoload/startify.vim b/autoload/startify.vim index 1c4eb01..bcb7151 100644 --- a/autoload/startify.vim +++ b/autoload/startify.vim @@ -181,6 +181,7 @@ endfunction " Function: s:show_dir {{{1 function! s:show_dir(cnt) abort let cnt = a:cnt + let num = s:numfiles let files = [] for fname in split(glob('.\=*')) @@ -205,8 +206,9 @@ function! s:show_dir(cnt) abort execute 'nnoremap ' index ':edit' fnameescape(fname) '' let cnt += 1 + let num -= 1 - if (cnt == s:numfiles) + if !num break endif endfor