+4
-2
lines changedFilter options
+4
-2
lines changed Original file line number Diff line number Diff line change
@@ -2638,6 +2638,8 @@ if !has_key(s:disabled_packages, 'autoindent')
2638
2638
let &tabstop = 2
2639
2639
endif
2640
2640
2641
+
let s:default_shiftwidth = &shiftwidth
2642
+
2641
2643
func! s:get_shiftwidth(indents) abort
2642
2644
let shiftwidth = 0
2643
2645
let max_count = 0
@@ -2788,8 +2790,8 @@ if !has_key(s:disabled_packages, 'autoindent')
2788
2790
return
2789
2791
endif
2790
2792
2791
-
" Do not autodetect indent if language sets it
2792
-
if &l:shiftwidth != &g:shiftwidth
2793
+
" Do not autodetect indent if language or user sets it
2794
+
if &l:shiftwidth != s:default_shiftwidth
2793
2795
return
2794
2796
endif
2795
2797
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4