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.
master
Benno Schulenberg 2020-06-21 11:00:57 +02:00
parent c7356c2d85
commit 24740815f6
1 changed files with 2 additions and 1 deletions

View File

@ -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;
}