New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nvim_command hangs when in 'f' mode #13626
Comments
See also |
Thanks, this lets me work around the issue! It still seems fundamentally awkward – for example, does this mean it's impossible to resize a window while waiting for the character after |
well, you don't need to block the process just because you are waiting for a responce from neovim. In the case of pynvim it uses two threads (because noone has written the "glue" to integrate glib eventloop with asyncio in a single thread), but you could also use whatever async/coroutine abstraction of your language (assuming zig in you case :). |
Is this really a bug or an enhancement? It is expected Nvim in a "pending" state is blocking (except for related #7142 |
I have no real opinion on whether this should be classified as a bug or an enhancement, just found it to be a surprising footgun when writing a GUI! Also, I just noticed that Vim and Neovim differ, at least in their TUIs: in Vim, if I type |
Clearing the pending |
This is by design. |
nvim --version
: NVIM v0.4.4, Build type: Release, LuaJIT 2.0.5vim -u DEFAULTS
(version: ) behaves differently? N/A, this is an RPC issue$TERM
:xterm-256color
, but this is not terminal-dependentSteps to reproduce using
nvim -u NORC
In the Neovim window, press
f
to enter find mode, but do not type a second character.In a separate Python shell, with
pynvim
installed:Actual behaviour
This will hang the Python shell until you Ctrl-C it, or type another character in the Neovim TUI.
I provided reproduction steps using the Python API, but this is particularly problematic when building a UI that embeds Neovim: it means that you can't ever use blocking
nvim_command
calls, because they will deadlock if anf
search is pending.Expected behaviour
nvim_command
is executed,HI
appears in the status line, and the Python shell does not block.The text was updated successfully, but these errors were encountered: