diff options
| author | Adam Stankiewicz <sheerun@sher.pl> | 2020-09-09 18:31:30 +0200 | 
|---|---|---|
| committer | Adam Stankiewicz <sheerun@sher.pl> | 2020-09-09 18:31:30 +0200 | 
| commit | 0ff5d451b0079f5be723276007cfbcc3d1fd06ca (patch) | |
| tree | 67bf0fd8489fab5dd98926e04e1c43095c6fcade | |
| parent | 49840b1893a9ad442c5b7cf65203af47c032e156 (diff) | |
| download | vim-polyglot-0ff5d451b0079f5be723276007cfbcc3d1fd06ca.tar.gz vim-polyglot-0ff5d451b0079f5be723276007cfbcc3d1fd06ca.zip | |
Fix b:sleuth_culprit for tabs
| -rw-r--r-- | ftdetect/polyglot.vim | 4 | 
1 files changed, 3 insertions, 1 deletions
| diff --git a/ftdetect/polyglot.vim b/ftdetect/polyglot.vim index 273cf26b..c13df516 100644 --- a/ftdetect/polyglot.vim +++ b/ftdetect/polyglot.vim @@ -1799,10 +1799,11 @@ if !has_key(s:disabled_packages, 'autoindent')      let heredoc = ''      let minindent = 10      let spaces_minus_tabs = 0 -    let i = 1 +    let i = 0      for line in a:lines        let i += 1 +        if !len(line) || line =~# '^\W*$'          continue        endif @@ -1871,6 +1872,7 @@ if !has_key(s:disabled_packages, 'autoindent')        if line[0] == "\t"          setlocal noexpandtab +        let b:sleuth_culprit .= ':' . i          return 1        elseif line[0] == " "          let indent = len(matchstr(line, '^ *')) | 
