diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2020-10-21 14:23:28 +0200 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2020-10-21 14:23:28 +0200 |
commit | 4b8687ebca35811bd4e6ead1eb849d883369c425 (patch) | |
tree | fd36a435b5963964db3ca7f08c19e41e41327f3c /ftdetect | |
parent | 78f6c8f318ad6ce429877498271d968961a83481 (diff) | |
download | vim-polyglot-4b8687ebca35811bd4e6ead1eb849d883369c425.tar.gz vim-polyglot-4b8687ebca35811bd4e6ead1eb849d883369c425.zip |
Fix deteting tab indents, closes #596
Diffstat (limited to 'ftdetect')
-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 29c13c35..bac11624 100644 --- a/ftdetect/polyglot.vim +++ b/ftdetect/polyglot.vim @@ -2730,7 +2730,9 @@ if !has_key(s:disabled_packages, 'autoindent') if line[0] == "\t" let spaces_minus_tabs -= 1 else - let spaces_minus_tabs += 1 + if line[0] == " " + let spaces_minus_tabs += 1 + endif let indent = len(matchstr(line, '^ *')) while stack[-1] > indent call remove(stack, -1) |