diff --git a/autoload/neocomplcache/sources/snippets_complete.vim b/autoload/neocomplcache/sources/snippets_complete.vim index 8d724c4..a900223 100644 --- a/autoload/neocomplcache/sources/snippets_complete.vim +++ b/autoload/neocomplcache/sources/snippets_complete.vim @@ -869,8 +869,15 @@ function! s:substitute_placeholder_marker(start, end, snippet_holder_cnt)"{{{ endfunction"}}} function! s:trigger(function)"{{{ let cur_text = neocomplcache#get_cur_text(1) + + let col = col('.') + if mode() !=# 'i' + " Fix column. + let col += 2 + endif + return printf("\:call %s(%s,%d)\", - \ a:function, string(cur_text), col('.')) + \ a:function, string(cur_text), col) endfunction"}}} function! s:eval_snippet(snippet_text)"{{{ let snip_word = '' diff --git a/doc/neocomplcache-snippets-complete.txt b/doc/neocomplcache-snippets-complete.txt index b2900d2..00657c0 100644 --- a/doc/neocomplcache-snippets-complete.txt +++ b/doc/neocomplcache-snippets-complete.txt @@ -310,6 +310,7 @@ CHANGELOG *neocomplcache-snippets-complete-changelog* 2012-09-23 - Fixed substitute tab character. - Improved cursor position. +- Fixed column in select mode. 2012-09-06 - Added neocomplcache__convertable attribute.