Fix #237 expand trigger problem

This commit is contained in:
Shougo Matsushita 2014-07-30 20:19:09 +09:00
parent 01d17aa885
commit b898dd9a9b
1 changed files with 8 additions and 2 deletions

View File

@ -119,8 +119,14 @@ function! neosnippet#mappings#_expand_target_trigger(trigger) "{{{
call cursor(line, col)
call neosnippet#view#_expand(
\ neosnippet#util#get_cur_text(). ' ', col, a:trigger)
if col == 1
let cur_text = a:trigger
else
let cur_text = neosnippet#util#get_cur_text()
let cur_text = cur_text[: col-2] . a:trigger . cur_text[col :]
endif
call neosnippet#view#_expand(cur_text, col, a:trigger)
endfunction"}}}
function! s:snippets_expand(cur_text, col) "{{{