Skip to content

Commit 549dcf0

Browse files
authored
Process autocmds when sw, et or ts option changes (#133)
The autocmd is only enabled on vim newer than 7.4.786 where the OptionSet autocmd feature was introduced.
1 parent 7ce9d4e commit 549dcf0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

plugin/indent_guides.vim

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,9 @@ augroup indent_guides
8686
endif
8787

8888
autocmd BufEnter,WinEnter,FileType * call indent_guides#process_autocmds()
89+
if (v:version == 704 && has('patch786')) || (v:version > 704)
90+
autocmd OptionSet tabstop,shiftwidth,expandtab call indent_guides#process_autocmds()
91+
endif
8992

9093
" Trigger BufEnter and process modelines.
9194
autocmd ColorScheme * doautocmd indent_guides BufEnter

0 commit comments

Comments
 (0)