From d5806ea44cbf1f1605e061d1fe875860b194378b Mon Sep 17 00:00:00 2001 From: Andy Stewart Date: Mon, 9 May 2016 12:14:30 +0100 Subject: [PATCH] Check existence of function --- autoload/gitgutter/debug.vim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/autoload/gitgutter/debug.vim b/autoload/gitgutter/debug.vim index 20a899a..a731f0c 100644 --- a/autoload/gitgutter/debug.vim +++ b/autoload/gitgutter/debug.vim @@ -80,7 +80,9 @@ endfunction function! gitgutter#debug#log(message, ...) if g:gitgutter_log if s:new_log_session && gitgutter#async#available() - call ch_logfile(s:channel_log, 'w') + if exists('*ch_logfile') + call ch_logfile(s:channel_log, 'w') + endif endif execute 'redir >> '.s:log_file