From 24740815f680f62458b40fcce9859dce7652b6d1 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Sun, 21 Jun 2020 11:00:57 +0200 Subject: [PATCH] files: make better use of the last row when there are many completions Put the "(more)" not in the first column of the last row but in the last column. --- src/files.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/files.c b/src/files.c index cf07bd8c..69b17e5d 100644 --- a/src/files.c +++ b/src/files.c @@ -2593,7 +2593,8 @@ char *input_tab(char *buf, size_t *place, void (*refresh_func)(void), bool *list wmove(edit, row, (longest_name + 2) * (match % ncols)); - if (row == editwinrows - 1 && num_matches - match > ncols) { + if (row == editwinrows - 1 && (match + 1) % ncols == 0 && + match + 1 < num_matches) { waddstr(edit, _("(more)")); break; }