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.c22
1 files changed, 18 insertions, 4 deletions
diff --git a/src/nvim/version.c b/src/nvim/version.c
index 8357de9f46..2c819c6f42 100644
--- a/src/nvim/version.c
+++ b/src/nvim/version.c
@@ -18,10 +18,24 @@
#include "nvim/misc2.h"
#include "nvim/screen.h"
#include "nvim/strings.h"
-#include "nvim/version_defs.h"
+
+// version info generated by the build system
+#include "auto/versiondef.h"
+
+#define STR_(x) #x
+#define STR(x) STR_(x)
+
+// for the startup-screen ( ":intro" command )
+#define NVIM_VERSION_MEDIUM STR(NVIM_VERSION_MAJOR) "." STR(NVIM_VERSION_MINOR)
+
+// for the ":version" command and "nvim --version"
+#define NVIM_VERSION_LONG "NVIM " NVIM_VERSION_MEDIUM "." STR(NVIM_VERSION_PATCH) NVIM_VERSION_PRERELEASE NVIM_VERSION_BUILD
+
char *Version = VIM_VERSION_SHORT;
-char *longVersion = NVIM_VERSION_LONG " (compiled " __DATE__ " " __TIME__ ")";
+char *longVersion = NVIM_VERSION_LONG;
+char *longVersionWithDate = NVIM_VERSION_LONG " (compiled " __DATE__ " " __TIME__ ")";
+char *mediumVersion = NVIM_VERSION_MEDIUM;
char *version_commit = "Commit: " NVIM_VERSION_COMMIT;
char *version_buildtype = "Build type: " NVIM_VERSION_BUILD_TYPE;
char *version_cflags = "Compilation: " NVIM_VERSION_CFLAGS;
@@ -169,7 +183,7 @@ static int included_patches[] = {
//618,
//617,
//616,
- //615,
+ 615,
//614,
//613,
//612,
@@ -885,7 +899,7 @@ void list_version(void)
{
// When adding features here, don't forget to update the list of
// internal variables in eval.c!
- MSG(longVersion);
+ MSG(longVersionWithDate);
MSG(version_commit);
MSG(version_buildtype);
MSG(version_cflags);