From c5625ffedd61a01de1399afef6fbcd31f5cda72f Mon Sep 17 00:00:00 2001 From: Adam Stankiewicz Date: Tue, 29 Dec 2020 20:33:47 +0100 Subject: Set shiftwidth to tabstop if greather, fixes #648 Also should fix situations like in #654 --- ftdetect/polyglot.vim | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ftdetect/polyglot.vim b/ftdetect/polyglot.vim index a8a5c319..ac934d53 100644 --- a/ftdetect/polyglot.vim +++ b/ftdetect/polyglot.vim @@ -2678,6 +2678,10 @@ if !has_key(g:polyglot_is_disabled, 'autoindent') let &tabstop = 2 endif + if &shiftwidth > &tabstop + let &shiftwidth = &tabstop + endif + let s:default_shiftwidth = &shiftwidth func! s:get_shiftwidth(indents) abort -- cgit v1.2.3