From 630f5d80861beb36ae2dfa0c587ec6b51982cff5 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Sun, 15 Nov 2015 15:17:51 +0900 Subject: [PATCH] Do not ignore messages from goyo callbacks Related: #16 /cc @kminh --- autoload/goyo.vim | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/autoload/goyo.vim b/autoload/goyo.vim index 6a3e602..e66c5c1 100644 --- a/autoload/goyo.vim +++ b/autoload/goyo.vim @@ -269,7 +269,9 @@ function! s:goyo_on(dim) if exists('g:goyo_callbacks[0]') call g:goyo_callbacks[0]() endif - silent! doautocmd User GoyoEnter + if exists('#User#GoyoEnter') + doautocmd User GoyoEnter + endif endfunction function! s:goyo_off() @@ -366,7 +368,9 @@ function! s:goyo_off() if exists('g:goyo_callbacks[1]') call g:goyo_callbacks[1]() endif - silent! doautocmd User GoyoLeave + if exists('#User#GoyoLeave') + doautocmd User GoyoLeave + endif endfunction function! s:relsz(expr, limit)