summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ftdetect/polyglot.vim4
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)