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--).
This commit is contained in:
Kei Kamikawa
2020-04-29 23:31:07 +09:00
parent e9cc383614
commit acf5e3e2b9

View File

@@ -2577,7 +2577,7 @@ static int do_more_prompt(int typed_char)
// We get called recursively when a timer callback outputs a message. In
// that case don't show another prompt. Also when at the hit-Enter prompt
// and nothing was typed.
if (entered || (State == HITRETURN && typed_char == 0)) {
if (headless_mode || entered || (State == HITRETURN && typed_char == 0)) {
return false;
}
entered = true;