Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Adding special conditions to the interactive module

The current code always assume there is a 'b:interactive' variable set on
the environment. This is not the case when we are using the statement

'b:interactive.is_close_immediately = 1'

It did complain at some point that the variable was non-existing, I added
an if statement that checked if the variable was there, before doing
anything.
  • Loading branch information...
commit 7d69e37e3aa60a91bc1b8c2f52ce1987055ec19a 1 parent a1ed731
@roman authored
Showing with 14 additions and 0 deletions.
  1. +7 −0 autoload/vimshell/hook.vim
  2. +7 −0 autoload/vimshell/interactive.vim
View
7 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
View
7 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
Please sign in to comment.
Something went wrong with that request. Please try again.