Update vital-over: including fix #177
This commit is contained in:
parent
0ae51b2ddc
commit
60cb17b87f
@ -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(...)
|
||||
while 1
|
||||
let char = call("getchar", a:000)
|
||||
" Workaround for the <expr> mappings
|
||||
if char !=# "\x80\xfd`"
|
||||
return type(char) == type(0) ? nr2char(char) : char
|
||||
endif
|
||||
endwhile
|
||||
endfunction
|
||||
|
||||
|
||||
|
@ -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")
|
||||
@ -59,13 +55,17 @@ let s:module = {
|
||||
for s:i in range(len(s:hooks))
|
||||
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
|
||||
|
@ -37,7 +37,11 @@ endfunction
|
||||
|
||||
function! s:module.redraw(cmdline)
|
||||
redraw
|
||||
" Workaround for the :set cedit=<C-c>
|
||||
" https://github.com/osyo-manga/vital-over/issues/52
|
||||
if &cedit != "<C-c>"
|
||||
normal! :
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! s:make()
|
||||
|
@ -1,5 +1,5 @@
|
||||
easymotion
|
||||
95279f3
|
||||
d5563d1
|
||||
|
||||
Over.Commandline.Base
|
||||
Over.Commandline.Modules.Cancel
|
||||
|
Loading…
x
Reference in New Issue
Block a user