Fix the default selection

This commit is contained in:
Shougo Matsushita 2016-02-24 07:20:47 +09:00
parent d910dc9aa0
commit e908126f40

View File

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