]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
terminal-util: make sure we never go below 10 characters line width
authorLennart Poettering <lennart@amutable.com>
Thu, 25 Jun 2026 09:10:54 +0000 (11:10 +0200)
committerLennart Poettering <lennart@amutable.com>
Thu, 2 Jul 2026 06:20:59 +0000 (08:20 +0200)
src/basic/terminal-util.c

index 436daa731195ac9baa4eebe30d98ca1710dbb489..45182ec8603b4fb05732de97bd137b203cb3152e 100644 (file)
@@ -555,6 +555,8 @@ int show_menu(char **x,
                                 column_max = LESS_BY(column_max, 6U);
                 }
 
+                /* Never make this narrower than 10 characters */
+                column_max = MAX(column_max, 10U);
                 column_width = CLAMP(widest+1, 10U, column_max);
         }