File tree Expand file tree Collapse file tree 2 files changed +3
-9
lines changed Expand file tree Collapse file tree 2 files changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ endfunction
1919" other buffers and windows.
2020"
2121function ! indent_guides#process_autocmds ()
22- if indent_guides#getvar (' indent_guides_autocmds_enabled ' )
22+ if indent_guides#getvar (' indent_guides_enable_on_vim_startup ' )
2323 call indent_guides#enable ()
2424 else
2525 call indent_guides#disable ()
@@ -30,7 +30,7 @@ endfunction
3030" Enables the indent guides for the current buffer
3131"
3232function ! indent_guides#enable ()
33- let b: indent_guides_autocmds_enabled = 1
33+ let b: indent_guides_enable_on_vim_startup = 1
3434
3535 if &diff || indent_guides#exclude_filetype ()
3636 call indent_guides#clear_matches ()
@@ -64,7 +64,7 @@ endfunction
6464" entering it.
6565"
6666function ! indent_guides#disable ()
67- let b: indent_guides_autocmds_enabled = 0
67+ let b: indent_guides_enable_on_vim_startup = 0
6868 call indent_guides#clear_matches ()
6969endfunction
7070
Original file line number Diff line number Diff line change @@ -44,7 +44,6 @@ function s:InitVariable(var, value)
4444endfunction
4545
4646" Fixed global variables
47- let g: indent_guides_autocmds_enabled = 0
4847let g: indent_guides_color_hex_pattern = ' #[0-9A-Fa-f]\{6\}'
4948let g: indent_guides_color_hex_guibg_pattern = ' guibg=\zs' . g: indent_guides_color_hex_pattern . ' \ze'
5049let g: indent_guides_color_name_guibg_pattern = " guibg='\\ ?\\ zs[0-9A-Za-z ]\\ +\\ ze'\\ ?"
@@ -81,11 +80,6 @@ nnoremap <unique><script> <Plug>IndentGuidesDisable :IndentGuidesDisable<CR>
8180augroup indent_guides
8281 autocmd !
8382
84- if g: indent_guides_enable_on_vim_startup
85- let g: indent_guides_autocmds_enabled = 1
86- autocmd VimEnter * :IndentGuidesEnable
87- endif
88-
8983 autocmd BufEnter ,WinEnter ,FileType * call indent_guides#process_autocmds ()
9084
9185 " Trigger BufEnter and process modelines.
You can’t perform that action at this time.
0 commit comments