aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/version.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/version.c')
-rw-r--r--src/nvim/version.c98
1 files changed, 44 insertions, 54 deletions
diff --git a/src/nvim/version.c b/src/nvim/version.c
index b0d4e194fa..997db1726b 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"
@@ -159,7 +160,7 @@ static const int included_patches[] = {
// 947,
// 946,
// 945,
- // 944,
+ 944,
// 943,
// 942,
// 941,
@@ -816,11 +817,11 @@ static const int included_patches[] = {
290,
// 289,
// 288 NA
- // 287,
+ 287,
// 286,
// 285 NA
// 284 NA
- // 283,
+ 283,
282,
// 281 NA
280,
@@ -855,18 +856,18 @@ static const int included_patches[] = {
// 251,
250,
// 249 NA
- // 248,
+ // 248 NA
247,
// 246 NA
- // 245,
+ 245,
// 244,
243,
- // 242,
+ 242,
// 241 NA
// 240 NA
// 239 NA
// 238,
- // 237,
+ 237,
// 236,
235,
// 234,
@@ -877,15 +878,15 @@ static const int included_patches[] = {
229,
// 228,
// 227,
- // 226,
+ 226,
// 225,
- // 224,
+ 224,
223,
// 222,
// 221 NA
// 220,
219,
- // 218,
+ 218,
// 217 NA
// 216,
// 215,
@@ -897,7 +898,7 @@ static const int included_patches[] = {
209,
208,
// 207,
- // 206,
+ 206,
205,
// 204,
// 203 NA
@@ -907,20 +908,20 @@ static const int included_patches[] = {
// 199 NA
// 198,
// 197,
- // 196,
+ 196,
195,
- // 194,
+ 194,
// 193 NA
// 192 NA
// 191 NA
190,
- // 189,
+ 189,
188,
// 187 NA
186,
// 185,
// 184,
- // 183,
+ // 183 NA
182,
181,
// 180,
@@ -939,31 +940,31 @@ static const int included_patches[] = {
167,
// 166,
165,
- // 164,
+ 164,
// 163 NA
// 162 NA
// 161 NA
// 160,
159,
158,
- // 157,
+ 157,
156,
- // 155,
+ 155,
// 154,
// 153,
// 152 NA
// 151,
150,
149,
- // 148,
+ 148,
147,
146,
// 145 NA
// 144 NA
143,
- // 142,
+ 142,
// 141,
- // 140,
+ 140,
// 139 NA
// 138 NA
137,
@@ -971,8 +972,8 @@ static const int included_patches[] = {
135,
134,
133,
- // 132,
- // 131,
+ 132,
+ 131,
// 130 NA
// 129 NA
128,
@@ -985,7 +986,7 @@ static const int included_patches[] = {
121,
// 120 NA
119,
- // 118,
+ 118,
// 117 NA
116,
// 115 NA
@@ -997,12 +998,12 @@ static const int included_patches[] = {
// 109 NA
// 108 NA
// 107 NA
- // 106,
+ 106,
// 105 NA
- // 104,
+ 104,
// 103 NA
- // 102,
- // 101,
+ 102,
+ 101,
100,
99,
// 98 NA
@@ -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
@@ -1365,7 +1355,7 @@ void intro_message(int colon)
N_("https://neovim.io/community"),
"",
N_("type :help nvim<Enter> if you are new! "),
- N_("type :CheckHealth<Enter> to optimize Nvim"),
+ N_("type :checkhealth<Enter> to optimize Nvim"),
N_("type :q<Enter> to exit "),
N_("type :help<Enter> for help "),
"",