Cap number of checked files

Closes #8.
This commit is contained in:
Tim Pope 2014-02-20 23:16:20 -05:00
parent 161344e470
commit 9d96ce0dc4
1 changed files with 1 additions and 1 deletions

View File

@ -116,7 +116,7 @@ function! s:detect() abort
let dir = expand('%:p:h')
while isdirectory(dir) && dir !=# fnamemodify(dir, ':h')
for pattern in patterns
for neighbor in split(glob(dir.'/'.pattern), "\n")
for neighbor in split(glob(dir.'/'.pattern), "\n")[0:31]
if neighbor !=# expand('%:p') && filereadable(neighbor)
call extend(options, s:guess(readfile(neighbor, '', 1024)), 'keep')
endif