From 2369cd5d2290c97b69a540dd88222a4ddcb1fe14 Mon Sep 17 00:00:00 2001 From: Adam Stankiewicz Date: Wed, 9 Sep 2020 18:02:38 +0200 Subject: Make b:sleuth_culprit more readable --- ftdetect/polyglot.vim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'ftdetect') diff --git a/ftdetect/polyglot.vim b/ftdetect/polyglot.vim index 37a2525e..f44a1959 100644 --- a/ftdetect/polyglot.vim +++ b/ftdetect/polyglot.vim @@ -1799,8 +1799,10 @@ if !has_key(s:disabled_packages, 'autoindent') let heredoc = '' let minindent = 10 let spaces_minus_tabs = 0 + let i = 1 for line in a:lines + let i += 1 if !len(line) || line =~# '^\W*$' continue endif @@ -1874,7 +1876,7 @@ if !has_key(s:disabled_packages, 'autoindent') let indent = len(matchstr(line, '^ *')) if (indent % 2 == 0 || indent % 3 == 0) && indent < minindent let minindent = indent - let b:sleuth_culprit .= ":" . line + let b:sleuth_culprit .= ':' . i endif endif endfor -- cgit v1.2.3