mirror of
https://github.com/junegunn/goyo.vim.git
synced 2025-11-17 07:43:42 -05:00
Allow users to define custom before/after callbacks (#3)
This commit is contained in:
@@ -168,6 +168,10 @@ function! s:goyo_on(width)
|
||||
|
||||
let &statusline = repeat(' ', winwidth(0))
|
||||
|
||||
if exists('g:goyo_callbacks[0]')
|
||||
call g:goyo_callbacks[0]()
|
||||
endif
|
||||
|
||||
augroup goyo
|
||||
autocmd!
|
||||
autocmd BufWinLeave <buffer> call s:goyo_off()
|
||||
@@ -231,6 +235,10 @@ function! s:goyo_off()
|
||||
if exists('#Powerline')
|
||||
doautocmd Powerline ColorScheme
|
||||
endif
|
||||
|
||||
if exists('g:goyo_callbacks[1]')
|
||||
call g:goyo_callbacks[1]()
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! s:goyo(...)
|
||||
|
||||
Reference in New Issue
Block a user