Skip to content

Commit acf5e3e

Browse files
committed
fixed hang issue with --headless and -r option specified
Calling the do_more_prompt function in headless mode will freeze neovim because it is eventally in the input-accepting state (the same as waiting for --more--).
1 parent e9cc383 commit acf5e3e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/nvim/message.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2577,7 +2577,7 @@ static int do_more_prompt(int typed_char)
25772577
// We get called recursively when a timer callback outputs a message. In
25782578
// that case don't show another prompt. Also when at the hit-Enter prompt
25792579
// and nothing was typed.
2580-
if (entered || (State == HITRETURN && typed_char == 0)) {
2580+
if (headless_mode || entered || (State == HITRETURN && typed_char == 0)) {
25812581
return false;
25822582
}
25832583
entered = true;

0 commit comments

Comments
 (0)