commit 24740815f680f62458b40fcce9859dce7652b6d1
parent c7356c2d8544ef8b1f8b0772f525055c1716070e
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Sun, 21 Jun 2020 11:00:57 +0200
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.
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git 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;
}