aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/version.lua
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/lua/vim/version.lua')
-rw-r--r--runtime/lua/vim/version.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/runtime/lua/vim/version.lua b/runtime/lua/vim/version.lua
index 0b149700b5..7c8823bd72 100644
--- a/runtime/lua/vim/version.lua
+++ b/runtime/lua/vim/version.lua
@@ -174,6 +174,10 @@ function M._version(version, strict) -- Adapted from https://github.com/folke/la
version = version:match('%d[^ ]*')
end
+ if version == nil then
+ return nil
+ end
+
local prerel = version:match('%-([^+]*)')
local prerel_strict = version:match('%-([0-9A-Za-z-]*)')
if