tools: Handle smaller terminal sizes in replay (#36766)

* Only show help if there's room for it

* show less

* wording
This commit is contained in:
Matt Purnell
2025-12-08 18:38:35 -06:00
committed by GitHub
parent 4e74e0f755
commit cce2e4d357

View File

@@ -115,7 +115,12 @@ void ConsoleUI::initWindows() {
w[Win::Log] = newwin(log_height - 2, max_width - 2 * BORDER_SIZE, 18, BORDER_SIZE);
scrollok(w[Win::Log], true);
}
w[Win::Help] = newwin(5, max_width - (2 * BORDER_SIZE), max_height - 6, BORDER_SIZE);
if (max_height >= 23) {
w[Win::Help] = newwin(5, max_width - (2 * BORDER_SIZE), max_height - 6, BORDER_SIZE);
} else if (max_height >= 17) {
w[Win::Help] = newwin(1, max_width - (2 * BORDER_SIZE), max_height - 1, BORDER_SIZE);
mvwprintw(w[Win::Help], 0, 0, "Expand screen vertically to list available commands");
}
// set the title bar
wbkgd(w[Win::Title], A_REVERSE);
@@ -124,7 +129,7 @@ void ConsoleUI::initWindows() {
// show windows on the real screen
refresh();
displayTimelineDesc();
displayHelp();
if (max_height >= 23) displayHelp();
updateSummary();
updateTimeline();
for (auto win : w) {