diff options
-rw-r--r-- | src/nvim/version.c | 40 |
1 files changed, 15 insertions, 25 deletions
diff --git a/src/nvim/version.c b/src/nvim/version.c index 30ebbb22bc..6f3ca12458 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -22,6 +22,7 @@ #include "nvim/message.h" #include "nvim/screen.h" #include "nvim/strings.h" +#include "nvim/lua/executor.h" // version info generated by the build system #include "auto/versiondef.h" @@ -1107,16 +1108,6 @@ static const int included_patches[] = { }; // clang-format on -/// Place to put a short description when adding a feature with a patch. -/// Keep it short, e.g.,: "relative numbers", "persistent undo". -/// Also add a comment marker to separate the lines. -/// See the official Vim patches for the diff format: It must use a context of -/// one line only. Create it by hand or use "diff -C2" and edit the patch. -static char *(extra_patches[]) = { - // Add your patch description below this line - NULL -}; - /// Compares a version string to the current Nvim version. /// /// @param version Version string like "1.3.42" @@ -1251,27 +1242,24 @@ static void list_features(void) MSG_PUTS("See \":help feature-compile\"\n\n"); } +void list_lua_version(void) +{ + typval_T luaver_tv; + typval_T arg = { .v_type = VAR_UNKNOWN }; // No args. + char *luaver_expr = "((jit and jit.version) and jit.version or _VERSION)"; + executor_eval_lua(cstr_as_string(luaver_expr), &arg, &luaver_tv); + assert(luaver_tv.v_type == VAR_STRING); + MSG(luaver_tv.vval.v_string); + xfree(luaver_tv.vval.v_string); +} + void list_version(void) { - // When adding features here, don't forget to update the list of - // internal variables in eval.c! MSG(longVersion); MSG(version_buildtype); + list_lua_version(); MSG(version_cflags); - // Print the list of extra patch descriptions if there is at least one. - char *s = ""; - if (extra_patches[0] != NULL) { - MSG_PUTS(_("\nExtra patches: ")); - s = ""; - - for (int i = 0; extra_patches[i] != NULL; ++i) { - MSG_PUTS(s); - s = ", "; - MSG_PUTS(extra_patches[i]); - } - } - #ifdef HAVE_PATHDEF if ((*compiled_user != NUL) || (*compiled_sys != NUL)) { @@ -1312,6 +1300,8 @@ void list_version(void) version_msg("\"\n"); } #endif // ifdef HAVE_PATHDEF + + version_msg("\nRun :checkhealth for more info"); } /// Output a string for the version message. If it's going to wrap, output a |