Fix jump back to original view

fix #210
This commit is contained in:
haya14busa 2016-01-18 04:26:41 +09:00
parent c646db0fef
commit 019fc00cba

View File

@ -1375,7 +1375,7 @@ function! s:EasyMotion(regexp, direction, visualmode, is_inclusive, ...) " {{{
" if you just use cursor(s:current.cursor_position) to jump back,
" current line will become middle of line window
if ! empty(a:visualmode)
keepjumps call winrestview({'lnum' : win_first_line, 'topline' : win_first_line})
keepjumps call winrestview({'lnum' : s:current.cursor_position[0], 'topline' : win_first_line})
else
" for adjusting cursorline
keepjumps call cursor(s:current.cursor_position)