From e908126f402c4c0f4ff6b21c9dd0e5349f39e585 Mon Sep 17 00:00:00 2001 From: Shougo Matsushita Date: Wed, 24 Feb 2016 07:20:47 +0900 Subject: [PATCH] Fix the default selection --- autoload/neosnippet/view.vim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/autoload/neosnippet/view.vim b/autoload/neosnippet/view.vim index ec2c955..8a8ee41 100644 --- a/autoload/neosnippet/view.vim +++ b/autoload/neosnippet/view.vim @@ -415,10 +415,12 @@ function! s:expand_placeholder(start, end, holder_cnt, line, ...) abort "{{{ let len += 1 endif + let mode = mode() + stopinsert normal! v - call cursor(0, col('.') + (mode() == 'i' ? len+1 : len)) + call cursor(0, col('.') + (mode ==# 'i' ? len+1 : len)) execute 'normal! ' "\" elseif pos[2] < col('$') startinsert