mirror of
https://github.com/junegunn/goyo.vim.git
synced 2025-11-17 07:43:42 -05:00
Promote the use of User events instead of g:goyo_callbacks
This does not break backward compatibility, g:goyo_callbacks is still allowed.
This commit is contained in:
@@ -224,6 +224,7 @@ function! s:goyo_on(width)
|
||||
if exists('g:goyo_callbacks[0]')
|
||||
call g:goyo_callbacks[0]()
|
||||
endif
|
||||
silent! doautocmd User GoyoEnter
|
||||
endfunction
|
||||
|
||||
function! s:goyo_off()
|
||||
@@ -312,6 +313,7 @@ function! s:goyo_off()
|
||||
if exists('g:goyo_callbacks[1]')
|
||||
call g:goyo_callbacks[1]()
|
||||
endif
|
||||
silent! doautocmd User GoyoLeave
|
||||
endfunction
|
||||
|
||||
function! s:goyo(bang, ...)
|
||||
|
||||
Reference in New Issue
Block a user