Skip to content
Browse files

Fix buffer position

  • Loading branch information...
1 parent 88c3bc1 commit 01471cee6c46458892313fa8d493679df3b5da8a @Shougo committed Jan 20, 2014
Showing with 2 additions and 9 deletions.
  1. +0 −8 autoload/vimshell/interactive.vim
  2. +2 −1 autoload/vimshell/terminal.vim
View
8 autoload/vimshell/interactive.vim
@@ -723,10 +723,6 @@ function! s:check_output(interactive, bufnr, bufnr_save) "{{{
return
endif
- if mode() !=# 'i' && type !=# 'vimshell'
- let intbuffer_pos = getpos('.')
- endif
-
if has_key(a:interactive, 'output_pos')
call setpos('.', a:interactive.output_pos)
endif
@@ -772,10 +768,6 @@ function! s:check_output(interactive, bufnr, bufnr_save) "{{{
\ winwidth(0), g:vimshell_scrollback_limit)
endif
- if !is_insert && type !=# 'vimshell'
- call setpos('.', intbuffer_pos)
- endif
-
if a:bufnr != a:bufnr_save && bufexists(a:bufnr_save)
execute bufwinnr(a:bufnr_save) . 'wincmd w'
endif
View
3 autoload/vimshell/terminal.vim
@@ -329,7 +329,8 @@ function! s:print_simple(is_error, lines) "{{{
let lines = lines[1:]
call append('.', lines)
- execute 'normal!' (len(lines)).'j$'
+ call cursor(line('.') + len(lines), 0)
+ call cursor(0, col('$'))
endfunction"}}}
function! s:set_cursor() "{{{
" Get real pos(0 origin).

0 comments on commit 01471ce

Please sign in to comment.
Something went wrong with that request. Please try again.