mirror of
https://github.com/sheerun/vim-polyglot.git
synced 2025-11-08 11:33:52 -05:00
Make b:sleuth_culprit more readable
This commit is contained in:
@@ -1799,8 +1799,10 @@ if !has_key(s:disabled_packages, 'autoindent')
|
|||||||
let heredoc = ''
|
let heredoc = ''
|
||||||
let minindent = 10
|
let minindent = 10
|
||||||
let spaces_minus_tabs = 0
|
let spaces_minus_tabs = 0
|
||||||
|
let i = 1
|
||||||
|
|
||||||
for line in a:lines
|
for line in a:lines
|
||||||
|
let i += 1
|
||||||
if !len(line) || line =~# '^\W*$'
|
if !len(line) || line =~# '^\W*$'
|
||||||
continue
|
continue
|
||||||
endif
|
endif
|
||||||
@@ -1874,7 +1876,7 @@ if !has_key(s:disabled_packages, 'autoindent')
|
|||||||
let indent = len(matchstr(line, '^ *'))
|
let indent = len(matchstr(line, '^ *'))
|
||||||
if (indent % 2 == 0 || indent % 3 == 0) && indent < minindent
|
if (indent % 2 == 0 || indent % 3 == 0) && indent < minindent
|
||||||
let minindent = indent
|
let minindent = indent
|
||||||
let b:sleuth_culprit .= ":" . line
|
let b:sleuth_culprit .= ':' . i
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
endfor
|
endfor
|
||||||
|
|||||||
Reference in New Issue
Block a user