diff --git a/autoload/vital/_easymotion/Over/Commandline/Base.vim b/autoload/vital/_easymotion/Over/Commandline/Base.vim index abf0cca..dc44464 100644 --- a/autoload/vital/_easymotion/Over/Commandline/Base.vim +++ b/autoload/vital/_easymotion/Over/Commandline/Base.vim @@ -35,7 +35,7 @@ endfunction function! s:make_plain() - return deepcpy(s:base) + return deepcopy(s:base) endfunction @@ -396,6 +396,9 @@ function! s:base._main(...) " call self._input(s:_getchar(0)) " call self.draw() call self._input(s:_getchar()) + if self._is_exit() + break + endif call self.draw() catch call self.callevent("on_exception") @@ -466,8 +469,13 @@ endfunction function! s:_getchar(...) - let char = call("getchar", a:000) - return type(char) == type(0) ? nr2char(char) : char + while 1 + let char = call("getchar", a:000) + " Workaround for the mappings + if char !=# "\x80\xfd`" + return type(char) == type(0) ? nr2char(char) : char + endif + endwhile endfunction diff --git a/autoload/vital/_easymotion/Over/Commandline/Modules/Doautocmd.vim b/autoload/vital/_easymotion/Over/Commandline/Modules/Doautocmd.vim index 03298da..93ca06f 100644 --- a/autoload/vital/_easymotion/Over/Commandline/Modules/Doautocmd.vim +++ b/autoload/vital/_easymotion/Over/Commandline/Modules/Doautocmd.vim @@ -3,15 +3,11 @@ let s:save_cpo = &cpo set cpo&vim -augroup vital-over-commandline-doautocmd-dummy - autocmd! -augroup END - - let s:cache_command = {} -function! s:doautocmd_user(command) +function! s:doautocmd_user(prefix, command) + let group = a:prefix . "-vital-over-commandline-doautocmd-dummy" if !has_key(s:cache_command, a:command) - execute "autocmd vital-over-commandline-doautocmd-dummy" + execute "autocmd " . group \ . " User " . a:command." silent! execute ''" if v:version > 703 || v:version == 703 && has("patch438") @@ -57,15 +53,19 @@ let s:module = { for s:i in range(len(s:hooks)) - execute join([ + execute join([ \ "function! s:module.on_" . s:hooks[s:i] . "(...)", -\ " call s:doautocmd_user(self.prefix . " . string(s:hooks_camel[s:i]) . ")", +\ " call s:doautocmd_user(self.prefix, self.prefix . " . string(s:hooks_camel[s:i]) . ")", \ "endfunction", \ ], "\n") endfor function! s:make(prefix) + execute "augroup " a:prefix . "-vital-over-commandline-doautocmd-dummy" + autocmd! + augroup END + let module = deepcopy(s:module) let module.prefix = a:prefix return module diff --git a/autoload/vital/_easymotion/Over/Commandline/Modules/Redraw.vim b/autoload/vital/_easymotion/Over/Commandline/Modules/Redraw.vim index 8ce2a11..d64b171 100644 --- a/autoload/vital/_easymotion/Over/Commandline/Modules/Redraw.vim +++ b/autoload/vital/_easymotion/Over/Commandline/Modules/Redraw.vim @@ -37,7 +37,11 @@ endfunction function! s:module.redraw(cmdline) redraw - normal! : + " Workaround for the :set cedit= + " https://github.com/osyo-manga/vital-over/issues/52 + if &cedit != "" + normal! : + endif endfunction function! s:make() diff --git a/autoload/vital/easymotion.vital b/autoload/vital/easymotion.vital index 3b40673..5f7bc7b 100644 --- a/autoload/vital/easymotion.vital +++ b/autoload/vital/easymotion.vital @@ -1,5 +1,5 @@ easymotion -95279f3 +d5563d1 Over.Commandline.Base Over.Commandline.Modules.Cancel