From 6b0c9d61e246cb3a046202de0a016451c0dc1ede Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Wed, 19 Mar 2014 11:45:10 -0400 Subject: [PATCH] Off by one --- plugin/sleuth.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/sleuth.vim b/plugin/sleuth.vim index d578afc..1904395 100644 --- a/plugin/sleuth.vim +++ b/plugin/sleuth.vim @@ -136,7 +136,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")[0:8] + for neighbor in split(glob(dir.'/'.pattern), "\n")[0:7] if neighbor !=# expand('%:p') && filereadable(neighbor) call extend(options, s:guess(readfile(neighbor, '', 256)), 'keep') endif