Fix the use of s:numfiles
This commit is contained in:
parent
e10b807ba9
commit
cede7aec39
|
@ -181,6 +181,7 @@ endfunction
|
||||||
" Function: s:show_dir {{{1
|
" Function: s:show_dir {{{1
|
||||||
function! s:show_dir(cnt) abort
|
function! s:show_dir(cnt) abort
|
||||||
let cnt = a:cnt
|
let cnt = a:cnt
|
||||||
|
let num = s:numfiles
|
||||||
let files = []
|
let files = []
|
||||||
|
|
||||||
for fname in split(glob('.\=*'))
|
for fname in split(glob('.\=*'))
|
||||||
|
@ -205,8 +206,9 @@ function! s:show_dir(cnt) abort
|
||||||
execute 'nnoremap <buffer>' index ':edit' fnameescape(fname) '<cr>'
|
execute 'nnoremap <buffer>' index ':edit' fnameescape(fname) '<cr>'
|
||||||
|
|
||||||
let cnt += 1
|
let cnt += 1
|
||||||
|
let num -= 1
|
||||||
|
|
||||||
if (cnt == s:numfiles)
|
if !num
|
||||||
break
|
break
|
||||||
endif
|
endif
|
||||||
endfor
|
endfor
|
||||||
|
|
Loading…
Reference in a new issue