mirror of
https://github.com/junegunn/goyo.vim.git
synced 2025-11-17 07:43:42 -05:00
Call before-callback after auto commands are set
This commit is contained in:
@@ -197,10 +197,6 @@ function! s:goyo_on(width)
|
|||||||
|
|
||||||
let &statusline = repeat(' ', winwidth(0))
|
let &statusline = repeat(' ', winwidth(0))
|
||||||
|
|
||||||
if exists('g:goyo_callbacks[0]')
|
|
||||||
call g:goyo_callbacks[0]()
|
|
||||||
endif
|
|
||||||
|
|
||||||
augroup goyo
|
augroup goyo
|
||||||
autocmd!
|
autocmd!
|
||||||
autocmd BufWinLeave <buffer> call s:goyo_off()
|
autocmd BufWinLeave <buffer> call s:goyo_off()
|
||||||
@@ -208,6 +204,10 @@ function! s:goyo_on(width)
|
|||||||
autocmd VimResized * call s:resize_pads()
|
autocmd VimResized * call s:resize_pads()
|
||||||
autocmd ColorScheme * call s:tranquilize()
|
autocmd ColorScheme * call s:tranquilize()
|
||||||
augroup END
|
augroup END
|
||||||
|
|
||||||
|
if exists('g:goyo_callbacks[0]')
|
||||||
|
call g:goyo_callbacks[0]()
|
||||||
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:goyo_off()
|
function! s:goyo_off()
|
||||||
|
|||||||
Reference in New Issue
Block a user