Shougo / neosnippet.vim

neo-snippet plugin
Other
1.12k stars 108 forks source link

Recent change may broke something? #456

Closed himkt closed 5 years ago

himkt commented 5 years ago

I got the error E121: Undefined variable: cur_text. Error trace said below.

function neosnippet#mappings#expand_or_jump_impl[1]..neosnippet#mappings#_trigger[3]..neosnippet#mappings#expandable_or_jumpable[1]..neosnippet#mappings#expandable[2]..neosnippet#mappings#completed_expandable[5]..<SNR>157_get_completed_snippets の処理中にエラーが検出されました:
行    6:
E121: Undefined variable: cur_text

I suspect this error has occurred by recent changes (https://github.com/Shougo/neosnippet.vim/commit/5ddf9e8c6f6c82236aa5172932b00c88fe36eca2 or https://github.com/Shougo/neosnippet.vim/commit/381bc2162f9c069485c5aa5810cafecb39c6cebe).

To give some clues, I forked neosnippet.vim and set a943f93433cb467688b405b62922c7e6013edeb8 as HEAD https://github.com/himkt/neosnippet.vim

Using himkt/neosnippet.vim, I do not observe the error.

alindeman commented 5 years ago

I submitted #457 to fix this.

himkt commented 5 years ago

@alindeman Awesome, thanks a lot!

@Shougo I put a tiny reproducible init.vim below.

call plug#begin('~/.vim/plugged')
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
Plug 'Shougo/neosnippet.vim'
Plug 'Shougo/neosnippet-snippets'
call plug#end()

let g:deoplete#enable_at_startup = 1

imap <C-k>     <Plug>(neosnippet_expand_or_jump)
smap <C-k>     <Plug>(neosnippet_expand_or_jump)
xmap <C-k>     <Plug>(neosnippet_expand_target)

My environment can be reproduced in this Dockerfile