1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-03-23 17:49:57 +08:00

Fix vim popup bug (#3616)

ref: https://github.com/vim/vim/issues/6424
This commit is contained in:
Wang Shidong 2020-07-09 20:55:27 +08:00 committed by GitHub
parent 2c96390ba9
commit bf511cd02b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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