Skip to content

Commit 7aac816

Browse files
Allen Linathanaelkane
authored andcommitted
Set size of indent guide to tabstop value when shiftwidth=0 is used
Fixes #57
1 parent eec1b62 commit 7aac816

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

autoload/indent_guides.vim

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,11 @@ endfunction
180180
" plugin is enabled.
181181
"
182182
function! indent_guides#init_script_vars()
183-
let s:indent_size = &l:shiftwidth
183+
if &l:shiftwidth > 0
184+
let s:indent_size = &l:shiftwidth
185+
else
186+
let s:indent_size = &l:tabstop
187+
endif
184188
let s:guide_size = indent_guides#calculate_guide_size()
185189
let s:hi_normal = indent_guides#capture_highlight('Normal')
186190

0 commit comments

Comments
 (0)