Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions autoload/indent_guides.vim
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ endfunction
" other buffers and windows.
"
function! indent_guides#process_autocmds()
if g:indent_guides_autocmds_enabled
if exists('b:indent_guides_autocmds_enabled') && b:indent_guides_autocmds_enabled
call indent_guides#enable()
else
call indent_guides#disable()
Expand All @@ -31,7 +31,7 @@ endfunction
" entering it.
"
function! indent_guides#enable()
let g:indent_guides_autocmds_enabled = 1
let b:indent_guides_autocmds_enabled = 1

if &diff || indent_guides#exclude_filetype()
call indent_guides#clear_matches()
Expand Down Expand Up @@ -63,7 +63,7 @@ endfunction
" entering it.
"
function! indent_guides#disable()
let g:indent_guides_autocmds_enabled = 0
let b:indent_guides_autocmds_enabled = 0
call indent_guides#clear_matches()
endfunction

Expand Down
2 changes: 1 addition & 1 deletion plugin/indent_guides.vim
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function s:InitVariable(var, value)
endfunction

" Fixed global variables
let g:indent_guides_autocmds_enabled = 0
let b:indent_guides_autocmds_enabled = 0
let g:indent_guides_color_hex_pattern = '#[0-9A-Fa-f]\{6\}'
let g:indent_guides_color_hex_guibg_pattern = 'guibg=\zs' . g:indent_guides_color_hex_pattern . '\ze'
let g:indent_guides_color_name_guibg_pattern = "guibg='\\?\\zs[0-9A-Za-z ]\\+\\ze'\\?"
Expand Down