aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-12-10 21:07:20 -0500
committerGitHub <noreply@github.com>2020-12-10 21:07:20 -0500
commitfaa47eafffe35ddfdee44d341d7dc06e97377b28 (patch)
treec112eef694aa37f364dab437d4644d3b8d54d3d5
parenta92dbf49bfde79d86a0542c175c0a5c9e23e14bd (diff)
downloadrneovim-faa47eafffe35ddfdee44d341d7dc06e97377b28.tar.gz
rneovim-faa47eafffe35ddfdee44d341d7dc06e97377b28.tar.bz2
rneovim-faa47eafffe35ddfdee44d341d7dc06e97377b28.zip
vim-patch:8.2.0005: duplication in version info (#13502)
Problem: Duplication in version info. Solution: Use preprocessor string concatenation. (Ken Takata, closes vim/vim#5357) https://github.com/vim/vim/commit/502122565665674d914a1feeb15ac4a0bb0c8723
-rw-r--r--src/nvim/version.c1
-rw-r--r--src/nvim/version.h11
2 files changed, 9 insertions, 3 deletions
diff --git a/src/nvim/version.c b/src/nvim/version.c
index 6be2a61c6a..834d27cc84 100644
--- a/src/nvim/version.c
+++ b/src/nvim/version.c
@@ -16,7 +16,6 @@
#include "nvim/iconv.h"
#include "nvim/version.h"
#include "nvim/charset.h"
-#include "nvim/macros.h"
#include "nvim/memline.h"
#include "nvim/memory.h"
#include "nvim/message.h"
diff --git a/src/nvim/version.h b/src/nvim/version.h
index c10f6fa534..4af038dd6c 100644
--- a/src/nvim/version.h
+++ b/src/nvim/version.h
@@ -2,6 +2,7 @@
#define NVIM_VERSION_H
#include "nvim/ex_cmds_defs.h"
+#include "nvim/macros.h"
// defined in version.c
extern char* Version;
@@ -10,14 +11,20 @@ extern char* longVersion;
//
// Vim version number, name, etc. Patchlevel is defined in version.c.
//
+
+// Values that change for a new release
#define VIM_VERSION_MAJOR 8
#define VIM_VERSION_MINOR 0
+
+// Values based on the above
+#define VIM_VERSION_MAJOR_STR STR(VIM_VERSION_MAJOR)
+#define VIM_VERSION_MINOR_STR STR(VIM_VERSION_MINOR)
#define VIM_VERSION_100 (VIM_VERSION_MAJOR * 100 + VIM_VERSION_MINOR)
// used for the runtime directory name
-#define VIM_VERSION_NODOT "vim80"
+#define VIM_VERSION_NODOT "vim" VIM_VERSION_MAJOR_STR VIM_VERSION_MINOR_STR
// swap file compatibility (max. length is 6 chars)
-#define VIM_VERSION_SHORT "8.0"
+#define VIM_VERSION_SHORT VIM_VERSION_MAJOR_STR "." VIM_VERSION_MINOR_STR
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "version.h.generated.h"