Fix #333 virtualedit problem

This commit is contained in:
Shougo Matsushita 2016-02-22 21:51:57 +09:00
parent 0571ffbc47
commit d910dc9aa0
1 changed files with 4 additions and 2 deletions

View File

@ -416,8 +416,10 @@ function! s:expand_placeholder(start, end, holder_cnt, line, ...) abort "{{{
endif
stopinsert
execute 'normal! v'.
\ repeat('l', (mode() == 'i' ? len+1 : len)) . "\<C-g>"
normal! v
call cursor(0, col('.') + (mode() == 'i' ? len+1 : len))
execute 'normal! ' "\<C-g>"
elseif pos[2] < col('$')
startinsert
else