Open michurin opened 2 years ago
This only seems to affect vim.fn.input
. I would rather remove vim.fn.input
only apply the change to vim.fn.input
. Which implementation of vim.ui.input
are you using?
Currently I use neovim 0.8.3. If I press C-c
here
:lua vim.ui.input({prompt = ">"}, print)
i obtain this error:
E5108: Error executing lua Keyboard interrupt
stack traceback:
[C]: in function 'input'
/usr/share/nvim/runtime/lua/vim/ui.lua:91: in function 'input'
[string ":lua"]:1: in main chunk
it is understandable and pcall
helps:
:lua pcall(vim.ui.input, {prompt = ">"}, print)
However, you are right, it seems vim.fn.input
already wrapped in 0.9.0 (vim.ui.input modern implementation). I'll play with 0.9 tomorrow. I see that pcall
is not needed for 0.9. However, what do you think, is it good idea to keep it for neovims before 0.9?
upd: I've installed nvim 0.9, and I confirm, there is no more errors. So my pull request is not actual anymore. It is good for previous versions of nvim only.
Wrap
vim.*.input
topcall
to avoidE5108: Error executing lua Keyboard interrupt
error onCTRL-C