aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/version.c
diff options
context:
space:
mode:
authorDaniel Hahler <git@thequod.de>2019-07-27 23:48:32 +0200
committerGitHub <noreply@github.com>2019-07-27 23:48:32 +0200
commit7f5a113f659fc88c2e9566c3dcdc1c8f0beccc5a (patch)
tree86218b1f0d3d3af1f7e21b3140bf8f96f62746a0 /src/nvim/version.c
parent8e6b0a73c91bb8650e21f56183c7fa83f6fb312f (diff)
downloadrneovim-7f5a113f659fc88c2e9566c3dcdc1c8f0beccc5a.tar.gz
rneovim-7f5a113f659fc88c2e9566c3dcdc1c8f0beccc5a.tar.bz2
rneovim-7f5a113f659fc88c2e9566c3dcdc1c8f0beccc5a.zip
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. https://github.com/vim/vim/commit/74da39373c90fcb390068903b5bbb93ce7ac16fa 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. https://github.com/vim/vim/commit/8a5c29aee978345132ad7f318b8a84633c33905c 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) https://github.com/vim/vim/commit/9800bfe0fc7596e8fee97172139f0777bac639fb
Diffstat (limited to 'src/nvim/version.c')
-rw-r--r--src/nvim/version.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/nvim/version.c b/src/nvim/version.c
index baa0df84f4..33b2a05cbb 100644
--- a/src/nvim/version.c
+++ b/src/nvim/version.c
@@ -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++;
+ }
}
}
}