From fb60f3cc9fef65bc068b69701cbb866d0fb8f489 Mon Sep 17 00:00:00 2001 From: Israel Chauca Fuentes Date: Tue, 21 Feb 2017 22:09:40 -0500 Subject: [PATCH] Try to avoid breaking redo. --- autoload/delimitMate.vim | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/autoload/delimitMate.vim b/autoload/delimitMate.vim index 043a7f2..0a03edb 100644 --- a/autoload/delimitMate.vim +++ b/autoload/delimitMate.vim @@ -45,6 +45,7 @@ unlet s:exprs let s:info = {} let s:info.char = '' let s:info.nesting = 0 +let s:info.typeahead = '' let s:info.template = {} function! s:debug(debug_level, ...) "{{{ @@ -200,6 +201,12 @@ function! delimitMate#TextChangedI(...) "{{{1 3DMDebug "20" return 0 endif + if !empty(s:info.typeahead) + 3DMDebug "B1" + call feedkeys(s:info.typeahead, 'tmi') + let s:info.typeahead = '' + return + endif if !s:option('enabled') 3DMDebug "21" return @@ -322,7 +329,7 @@ function! delimitMate#InsertCharPre(str) "{{{1 return 0 endif 3DMDebug keys - call feedkeys(keys, 'mti') + let s:info.typeahead .= keys endfor endfunction