Skip to content
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

"Press-Enter" prompt in headless mode #9358

Closed
blueyed opened this issue Dec 12, 2018 · 2 comments · Fixed by #17199
Closed

"Press-Enter" prompt in headless mode #9358

blueyed opened this issue Dec 12, 2018 · 2 comments · Fixed by #17199
Milestone

Comments

@blueyed
Copy link
Contributor

blueyed commented Dec 12, 2018

nvim --headless -c 'echoerr 1' will display the error and appears to wait for the Enter from the hit-enter prompt:

Error detected while processing command line:
1

It does not handle any Enter presses though, and Ctrl-C is required to cancel it.

Without --headless it will redraw the screen and displays:

Error detected while processing command line:
1
Press ENTER or type command to continue

You can use nvim --headless -c 'echoerr 1' -c q to work around this, but Neovim should not hang there without -c q already.

@justinmk
Copy link
Member

Yeah, in --headless mode we should not wait for user input. We already do a similar check in msg_use_printf, maybe we need a condition in the need_wait_return muck.

@justinmk justinmk added this to the todo milestone Dec 12, 2018
@blueyed
Copy link
Contributor Author

blueyed commented Dec 12, 2018

I could fix it for my use case by checking msg_use_printf in wait_return, but for the test case here that appears to not be enough, i.e. some other code path is used there - wait_return is not involved.

@justinmk justinmk changed the title Neovim appears to wait Enter in headless mode with errors "Press-Enter" prompt in headless mode Dec 16, 2018
@justinmk justinmk modified the milestones: todo, 0.3.3 Dec 16, 2018
@justinmk justinmk modified the milestones: 0.4.x, 0.4 Jan 2, 2019
@justinmk justinmk modified the milestones: 0.4, 0.5 Jul 1, 2019
@janlazo janlazo modified the milestones: 0.5, 0.5.1 Feb 14, 2021
@bfredl bfredl modified the milestones: 0.5.1, 0.6 Aug 15, 2021
@clason clason modified the milestones: 0.6, 0.7 Nov 30, 2021
glacambre added a commit to glacambre/neovim that referenced this issue Jan 26, 2022
This commit fixes neovim#9358, where emitting multiple messages with 'echo' or
a single one with 'echom' or 'echoerr' would result in a press-enter
prompt that couldn't be dismissed by pressing enter.

This requires adapting a few tests to spawn a UI before testing whether
press-enter prompts are blocking.

It also fixes neovim#11718, as when combined with neovim#15910 it enables making
sure that neovim never blocks and emits messages on startup.
glacambre added a commit to glacambre/neovim that referenced this issue Feb 5, 2022
This commit fixes neovim#9358, where emitting multiple messages with 'echo' or
a single one with 'echom' or 'echoerr' would result in a press-enter
prompt that couldn't be dismissed by pressing enter.

This requires adapting a few tests to spawn a UI before testing whether
press-enter prompts are blocking.

It also fixes neovim#11718, as when combined with neovim#15910 it enables making
sure that neovim never blocks and emits messages on startup.
glacambre added a commit to glacambre/neovim that referenced this issue Feb 5, 2022
This commit fixes neovim#9358, where emitting multiple messages with 'echo' or
a single one with 'echom' or 'echoerr' would result in a press-enter
prompt that couldn't be dismissed by pressing enter.

This requires adapting a few tests to spawn a UI before testing whether
press-enter prompts are blocking.

It also fixes neovim#11718, as when combined with neovim#15910 it enables making
sure that neovim never blocks and emits messages on startup.
glacambre added a commit to glacambre/neovim that referenced this issue Feb 5, 2022
This commit fixes neovim#9358, where emitting multiple messages with 'echo' or
a single one with 'echom' or 'echoerr' would result in a press-enter
prompt that couldn't be dismissed by pressing enter.

This requires adapting a few tests to spawn a UI before testing whether
press-enter prompts are blocking.

It also fixes neovim#11718, as when combined with neovim#15910 it enables making
sure that neovim never blocks and emits messages on startup.
glacambre added a commit to glacambre/neovim that referenced this issue Feb 5, 2022
This commit fixes neovim#9358, where emitting multiple messages with 'echo' or
a single one with 'echom' or 'echoerr' would result in a press-enter
prompt that couldn't be dismissed by pressing enter.

This requires adapting a few tests to spawn a UI before testing whether
press-enter prompts are blocking.

It also fixes neovim#11718, as when combined with neovim#15910 it enables making
sure that neovim never blocks and emits messages on startup.
zbirenbaum pushed a commit to zbirenbaum/neovim that referenced this issue Feb 11, 2022
This commit fixes neovim#9358, where emitting multiple messages with 'echo' or
a single one with 'echom' or 'echoerr' would result in a press-enter
prompt that couldn't be dismissed by pressing enter.

This requires adapting a few tests to spawn a UI before testing whether
press-enter prompts are blocking.

It also fixes neovim#11718, as when combined with neovim#15910 it enables making
sure that neovim never blocks and emits messages on startup.
@zeertzjq zeertzjq modified the milestones: 0.8, 0.7 Mar 12, 2022
dmitmel pushed a commit to dmitmel/neovim that referenced this issue Apr 16, 2022
This commit fixes neovim#9358, where emitting multiple messages with 'echo' or
a single one with 'echom' or 'echoerr' would result in a press-enter
prompt that couldn't be dismissed by pressing enter.

This requires adapting a few tests to spawn a UI before testing whether
press-enter prompts are blocking.

It also fixes neovim#11718, as when combined with neovim#15910 it enables making
sure that neovim never blocks and emits messages on startup.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants