mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-03-23 17:49:57 +08:00
parent
2c96390ba9
commit
bf511cd02b
@ -447,10 +447,21 @@ function! s:handle_input(input) abort " {{{
|
|||||||
endif
|
endif
|
||||||
endfunction " }}}
|
endfunction " }}}
|
||||||
|
|
||||||
function! s:getchar(...) abort
|
if has('nvim')
|
||||||
let ret = call('getchar', a:000)
|
function! s:getchar(...) abort
|
||||||
return (type(ret) == type(0) ? nr2char(ret) : ret)
|
let ret = call('getchar', a:000)
|
||||||
endfunction
|
return (type(ret) == type(0) ? nr2char(ret) : ret)
|
||||||
|
endfunction
|
||||||
|
else
|
||||||
|
function! s:getchar(...) abort
|
||||||
|
let ret = call('getchar', a:000)
|
||||||
|
while ret ==# "\x80\xfd\d"
|
||||||
|
let ret = call('getchar', a:000)
|
||||||
|
endwhile
|
||||||
|
return (type(ret) == type(0) ? nr2char(ret) : ret)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
" wait for in input sub function should be not block vim
|
" wait for in input sub function should be not block vim
|
||||||
|
Loading…
x
Reference in New Issue
Block a user