diff --git a/autoload/neosnippet/init.vim b/autoload/neosnippet/init.vim index f3d8a18..75d7924 100644 --- a/autoload/neosnippet/init.vim +++ b/autoload/neosnippet/init.vim @@ -57,8 +57,6 @@ function! s:initialize_others() abort "{{{ \ call neosnippet#variables#set_snippets({}) autocmd BufEnter * \ call neosnippet#mappings#_clear_select_mode_mappings() - autocmd TextChanged,TextChangedI * - \ call neosnippet#handlers#_restore_unnamed_register() augroup END"}}} if g:neosnippet#enable_auto_clear_markers @@ -73,6 +71,11 @@ function! s:initialize_others() abort "{{{ \ call neosnippet#handlers#_complete_done() endif + if exists('##TextChanged') && exists('##TextChangedI') + autocmd neosnippet TextChanged,TextChangedI * + \ call neosnippet#handlers#_restore_unnamed_register() + endif + augroup neosnippet autocmd BufNewFile,BufRead,Syntax * \ execute 'syntax match neosnippetExpandSnippets'