Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

- Fixed preinput bug.

  • Loading branch information...
commit f08db3d4dbc7c340b4c567ab1dd73d7e6464ade1 1 parent 0ed9f09
@Shougo Shougo authored
Showing with 11 additions and 2 deletions.
  1. +8 −2 autoload/vimshell/interactive.vim
  2. +3 −0  doc/vimshell.txt
View
10 autoload/vimshell/interactive.vim
@@ -1,7 +1,7 @@
"=============================================================================
" FILE: interactive.vim
" AUTHOR: Shougo Matsushita <Shougo.Matsu@gmail.com>
-" Last Modified: 01 Jul 2011.
+" Last Modified: 02 Jul 2011.
" License: MIT license {{{
" Permission is hereby granted, free of charge, to any person obtaining
" a copy of this software and associated documentation files (the
@@ -81,6 +81,7 @@ function! vimshell#interactive#execute_pty_inout(is_insert)"{{{
if l:in !~ "\<C-d>$"
let l:in .= "\<LF>"
endif
+ call vimshell#history#append(l:in)
call s:send_string(l:in, a:is_insert, line('.'))
endfunction"}}}
@@ -179,6 +180,11 @@ function! s:send_string(string, is_insert, linenr)"{{{
let l:in = a:string
+ let l:context = vimshell#get_context()
+ let l:context.is_interactive = 1
+
+ let l:in = vimshell#hook#call_filter('preinput', l:context, l:in)
+
if b:interactive.encoding != '' && &encoding != b:interactive.encoding
" Convert encoding.
let l:in = iconv(l:in, &encoding, b:interactive.encoding)
@@ -205,7 +211,7 @@ function! s:send_string(string, is_insert, linenr)"{{{
call s:set_output_pos(a:is_insert)
" Call postinput hook.
- call vimshell#hook#call('postinput', vimshell#get_context(), l:in)
+ call vimshell#hook#call('postinput', l:context, l:in)
endfunction"}}}
function! vimshell#interactive#set_send_buffer(bufname)"{{{
let l:bufname = a:bufname == '' ? bufname('%') : a:bufname
View
3  doc/vimshell.txt
@@ -217,6 +217,9 @@ BUGS *vimshell-bugs*
==============================================================================
CHANGELOG *vimshell-changelog*
+2011-07-02
+- Fixed preinput bug.
+
2011-07-01
- Improved escape sequences.
- Close popup if output.
Please sign in to comment.
Something went wrong with that request. Please try again.