Skip to content

Commit c5625ff

Browse files
committed
Set shiftwidth to tabstop if greather, fixes sheerun#648
Also should fix situations like in sheerun#654
1 parent 45f2f94 commit c5625ff

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ftdetect/polyglot.vim

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2678,6 +2678,10 @@ if !has_key(g:polyglot_is_disabled, 'autoindent')
26782678
let &tabstop = 2
26792679
endif
26802680

2681+
if &shiftwidth > &tabstop
2682+
let &shiftwidth = &tabstop
2683+
endif
2684+
26812685
let s:default_shiftwidth = &shiftwidth
26822686

26832687
func! s:get_shiftwidth(indents) abort

0 commit comments

Comments
 (0)