From 04daf62dbf9a1668b5eb12b64f90701b11f374ca Mon Sep 17 00:00:00 2001 From: ailin-nemui Date: Fri, 28 Sep 2018 14:30:39 +0200 Subject: [PATCH] Fix insufficient size of help column when the window width is small --- src/fe-common/core/fe-help.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/fe-common/core/fe-help.c b/src/fe-common/core/fe-help.c index 23a6e701..c7566113 100644 --- a/src/fe-common/core/fe-help.c +++ b/src/fe-common/core/fe-help.c @@ -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;