:: commit c2baac6d769b26882365ec30aa5e61f772fa337a

Mintsuki <mintsuki@protonmail.com> — 2026-04-12 09:49

parents: a9d24f00b7

menu: Shorten countdown text and restore 40-column minimum

diff --git a/common/menu.c b/common/menu.c
index d967e456..87f88b9e 100644
--- a/common/menu.c
+++ b/common/menu.c
@@ -1331,7 +1331,7 @@ noreturn void _menu(bool first_run) {
 
     menu_init_term();
 
-    if (terms[0]->cols < 70 || terms[0]->rows < 16) {
+    if (terms[0]->cols < 40 || terms[0]->rows < 16) {
         // Terminal too small for menu, fall back to text console
 #if defined (BIOS)
         vga_textmode_init(true);
@@ -1492,10 +1492,10 @@ refresh:
         for (size_t i = timeout; i; i--) {
             size_t ndigits = 1;
             for (size_t tmp = i / 10; tmp > 0; tmp /= 10) ndigits++;
-            size_t msg_len = 65 + ndigits;
-            set_cursor_pos_helper(msg_len < terms[0]->cols ? (terms[0]->cols - msg_len) / 2 : 0, terms[0]->rows - 2);
+            size_t msg_len = 28 + ndigits;
+            set_cursor_pos_helper((terms[0]->cols - msg_len) / 2, terms[0]->rows - 2);
             FOR_TERM(TERM->scroll_enabled = false);
-            print("\e[2K%sBooting automatically in %s%U%s, press any key to stop the countdown...\e[0m",
+            print("\e[2K%sBooting automatically in %s%U%s...\e[0m",
                   interface_help_colour, interface_help_colour_bright, (uint64_t)i, interface_help_colour);
             FOR_TERM(TERM->scroll_enabled = true);
             FOR_TERM(TERM->double_buffer_flush(TERM));
tab: 248 wrap: offon