From 0571ffbc4709f5a5b2cd5dc2f01e88ea33988bfb Mon Sep 17 00:00:00 2001 From: Shougo Matsushita Date: Thu, 18 Feb 2016 06:12:47 +0900 Subject: [PATCH] Fix TextChanged error --- autoload/neosnippet/init.vim | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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'