From 4b8687ebca35811bd4e6ead1eb849d883369c425 Mon Sep 17 00:00:00 2001 From: Adam Stankiewicz Date: Wed, 21 Oct 2020 14:23:28 +0200 Subject: Fix deteting tab indents, closes #596 --- 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 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) -- cgit v1.2.3