Add ++nested modifier to TabLeave autocommand

This allows autocommands to fire for commands during s:goyo_off.

A prominent example would be any autocommands user's installed on the
ColorScheme event (e.g., to set User highlights, like @benknoble does in
his Dotfiles).
This commit is contained in:
David Ben Knoble
2019-06-11 14:12:02 -04:00
committed by Junegunn Choi
parent 012290431a
commit e3ed30fdb1

View File

@@ -260,7 +260,7 @@ function! s:goyo_on(dim)
augroup goyo augroup goyo
autocmd! autocmd!
autocmd TabLeave * call s:goyo_off() autocmd TabLeave * ++nested call s:goyo_off()
autocmd VimResized * call s:resize_pads() autocmd VimResized * call s:resize_pads()
autocmd ColorScheme * call s:tranquilize() autocmd ColorScheme * call s:tranquilize()
autocmd BufWinEnter * call s:hide_linenr() | call s:hide_statusline() autocmd BufWinEnter * call s:hide_linenr() | call s:hide_statusline()