fix(messages): allow more prompt in headless mode with UI (#27905)

Problem:  More prompt is not shown in headless mode even if there is a
          UI attached.
Solution: Don't skip more prompt when there is a UI active.
This commit is contained in:
zeertzjq
2024-03-18 10:34:27 +08:00
committed by GitHub
parent 3b29b39e6d
commit eabf9de1dc
3 changed files with 56 additions and 5 deletions

View File

@@ -2713,7 +2713,7 @@ static bool do_more_prompt(int typed_char)
// If headless mode is enabled and no input is required, this variable
// will be true. However If server mode is enabled, the message "--more--"
// should be displayed.
bool no_need_more = headless_mode && !embedded_mode;
bool no_need_more = headless_mode && !embedded_mode && !ui_active();
// 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