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.
This commit is contained in:
mhaehnel
2023-02-21 19:13:58 +01:00
committed by GitHub
parent 7ce9d4ee7f
commit 549dcf0d1f

View File

@@ -86,6 +86,9 @@ augroup indent_guides
endif
autocmd BufEnter,WinEnter,FileType * call indent_guides#process_autocmds()
if (v:version == 704 && has('patch786')) || (v:version > 704)
autocmd OptionSet tabstop,shiftwidth,expandtab call indent_guides#process_autocmds()
endif
" Trigger BufEnter and process modelines.
autocmd ColorScheme * doautocmd indent_guides BufEnter