Tweak limits for checking other files

References #8.
This commit is contained in:
Tim Pope 2014-03-19 01:09:56 -04:00
parent 6779f5ee5a
commit 790963321d

View File

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