]> jfr.im git - irc/irssi/irssi.git/commitdiff
Fix insufficient size of help column when the window width is small
authorailin-nemui <redacted>
Fri, 28 Sep 2018 12:30:39 +0000 (14:30 +0200)
committerailin-nemui <redacted>
Fri, 28 Sep 2018 12:30:39 +0000 (14:30 +0200)
src/fe-common/core/fe-help.c

index 23a6e7016cb6642c7810e915fc3fe44862c61fa8..c7566113164d4eb0833b70d0c1d09c126cc4ccaf 100644 (file)
@@ -77,7 +77,12 @@ static void help_category(GSList *cmdlist, int items)
                                    max_width, 6, 1, 3, &columns, &rows);
        cmdlist = columns_sort_list(cmdlist, rows);
 
-        /* rows in last column */
+       /* if the screen is too narrow the window width may be not
+          enough for even 1 column */
+       if (cols == 1 && columns[0] > max_width)
+               max_width = columns[0];
+
+       /* rows in last column */
        last_col_rows = rows-(cols*rows-g_slist_length(cmdlist));
        if (last_col_rows == 0)
                 last_col_rows = rows;