From 7aac8169ea670c755b99baea6f08503d6dfef517 Mon Sep 17 00:00:00 2001 From: Allen Li Date: Sun, 16 Feb 2014 21:07:37 -0500 Subject: [PATCH] Set size of indent guide to `tabstop` value when `shiftwidth=0` is used Fixes #57 --- autoload/indent_guides.vim | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/autoload/indent_guides.vim b/autoload/indent_guides.vim index 95a9552..9bc95fa 100644 --- a/autoload/indent_guides.vim +++ b/autoload/indent_guides.vim @@ -180,7 +180,11 @@ endfunction " plugin is enabled. " 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:hi_normal = indent_guides#capture_highlight('Normal')