vim-patch:8.1.1748: :args output is not aligned (#10625)

Problem:    :args output is not aligned.
Solution:   Output a line break after the last item in a row.
74da39373c

vim-patch:8.1.1750: depending on the terminal width :version may miss a line break

Problem:    Depending on the terminal width :version may miss a line break.
Solution:   Add a line break when needed.
8a5c29aee9

vim-patch:8.1.1760: extra line break for wrapping output of :args

Problem:    Extra line break for wrapping output of :args.
Solution:   Avoid the extra line break. (Daniel Hahler, closes vim/vim#4737)
9800bfe0fc
This commit is contained in:
Daniel Hahler
2019-07-27 23:48:32 +02:00
committed by GitHub
parent 8e6b0a73c9
commit 7f5a113f65
2 changed files with 31 additions and 1 deletions

View File

@@ -2038,6 +2038,9 @@ static void version_msg(char *s)
static void list_features(void)
{
list_in_columns((char_u **)features, -1, -1);
if (msg_col > 0) {
msg_putchar('\n');
}
MSG_PUTS("See \":help feature-compile\"\n\n");
}
@@ -2065,7 +2068,7 @@ void list_in_columns(char_u **items, int size, int current)
// Not enough screen columns - show one per line
for (i = 0; i < item_count; i++) {
version_msg_wrap(items[i], i == current);
if (msg_col > 0) {
if (msg_col > 0 && i < item_count - 1) {
msg_putchar('\n');
}
}
@@ -2100,6 +2103,14 @@ void list_in_columns(char_u **items, int size, int current)
msg_putchar(' ');
}
}
} else {
// this row is out of items, thus at the end of the row
if (msg_col > 0) {
if (cur_row < nrow) {
msg_putchar('\n');
}
cur_row++;
}
}
}
}