diff options
author | Daniel Hahler <git@thequod.de> | 2019-08-06 18:55:14 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-06 18:55:14 +0200 |
commit | dc1359bf8ed3afae99cceb2ee7a786d4d2b9f037 (patch) | |
tree | 40c1a4363ba78d3c1c2a45a7d9ecc16982f04131 /src | |
parent | 8218d474fa61dbcb221f199506c7c85f60a5e170 (diff) | |
download | rneovim-dc1359bf8ed3afae99cceb2ee7a786d4d2b9f037.tar.gz rneovim-dc1359bf8ed3afae99cceb2ee7a786d4d2b9f037.tar.bz2 rneovim-dc1359bf8ed3afae99cceb2ee7a786d4d2b9f037.zip |
Fix list_features to include space after first feature (#10711)
Regressed in e134cc9d4a: the use of list_in_columns was not adding a
space after the first features, because we do not start on a new line:
> Features: -acl+iconv +tui
This moves all the related code to `list_features`, and just joins them
with spaces.
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/version.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/nvim/version.c b/src/nvim/version.c index 33b2a05cbb..e07865a410 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -2034,14 +2034,19 @@ static void version_msg(char *s) version_msg_wrap((char_u *)s, false); } -/// List all features aligned in columns, dictionary style. +/// List all features. +/// This does not use list_in_columns (as in Vim), because there are only a +/// few, and we do not start at a new line. static void list_features(void) { - list_in_columns((char_u **)features, -1, -1); - if (msg_col > 0) { - msg_putchar('\n'); + version_msg(_("\n\nFeatures: ")); + for (int i = 0; features[i] != NULL; i++) { + version_msg(features[i]); + if (features[i+1] != NULL) { + version_msg(" "); + } } - MSG_PUTS("See \":help feature-compile\"\n\n"); + version_msg("\nSee \":help feature-compile\"\n\n"); } /// List string items nicely aligned in columns. @@ -2150,8 +2155,6 @@ void list_version(void) } #endif // ifdef HAVE_PATHDEF - version_msg(_("\n\nFeatures: ")); - list_features(); #ifdef SYS_VIMRC_FILE |