Set size of indent guide to tabstop value when shiftwidth=0 is used

Fixes #57
This commit is contained in:
Allen Li 2014-02-16 21:07:37 -05:00 committed by Nate Kane
parent eec1b629dc
commit 7aac8169ea

View File

@ -180,7 +180,11 @@ endfunction
" plugin is enabled. " plugin is enabled.
" "
function! indent_guides#init_script_vars() function! indent_guides#init_script_vars()
let s:indent_size = &l:shiftwidth if &l:shiftwidth > 0
let s:indent_size = &l:shiftwidth
else
let s:indent_size = &l:tabstop
endif
let s:guide_size = indent_guides#calculate_guide_size() let s:guide_size = indent_guides#calculate_guide_size()
let s:hi_normal = indent_guides#capture_highlight('Normal') let s:hi_normal = indent_guides#capture_highlight('Normal')