mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-23 12:50:04 +08:00
parent
2c96390ba9
commit
bf511cd02b
@ -447,10 +447,21 @@ function! s:handle_input(input) abort " {{{
|
||||
endif
|
||||
endfunction " }}}
|
||||
|
||||
function! s:getchar(...) abort
|
||||
let ret = call('getchar', a:000)
|
||||
return (type(ret) == type(0) ? nr2char(ret) : ret)
|
||||
endfunction
|
||||
if has('nvim')
|
||||
function! s:getchar(...) abort
|
||||
let ret = call('getchar', a:000)
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user