diff --git a/autoload/vimshell/hook.vim b/autoload/vimshell/hook.vim index 241b81ff..5b0f5bb9 100644 --- a/autoload/vimshell/hook.vim +++ b/autoload/vimshell/hook.vim @@ -25,6 +25,13 @@ "============================================================================= function! vimshell#hook#call(hook_point, context, args)"{{{ + " There are cases when this variable doesn't + " exist + " USE: 'b:interactive.is_close_immediately = 1' to replicate + if !exists('b:interactive') + return + end + if !a:context.is_interactive \ || !has_key(b:interactive.hook_functions_table, a:hook_point) return diff --git a/autoload/vimshell/interactive.vim b/autoload/vimshell/interactive.vim index 6c19fd93..7b00395c 100644 --- a/autoload/vimshell/interactive.vim +++ b/autoload/vimshell/interactive.vim @@ -293,6 +293,13 @@ function! vimshell#interactive#execute_pipe_out(is_insert)"{{{ endif endfunction"}}} function! s:set_output_pos(is_insert)"{{{ + " There are cases when this variable doesn't + " exist + " USE: 'b:interactive.is_close_immediately = 1' to replicate + if !exists('b:interactive') + return + end + if b:interactive.type !=# 'terminal' && \ has_key(b:interactive.process, 'eof') && !b:interactive.process.eof if a:is_insert