aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/version.lua
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2023-06-12 01:14:33 +0200
committerJustin M. Keyes <justinkz@gmail.com>2023-06-12 01:14:33 +0200
commite6887932539315e02621edb77d5e77c7c2a0b033 (patch)
treed3c053756e9ba69f63787737039de228584d2cd5 /runtime/lua/vim/version.lua
parentecdb6465e272119f80f3b68a6695e0f74b02ca49 (diff)
downloadrneovim-e6887932539315e02621edb77d5e77c7c2a0b033.tar.gz
rneovim-e6887932539315e02621edb77d5e77c7c2a0b033.tar.bz2
rneovim-e6887932539315e02621edb77d5e77c7c2a0b033.zip
feat: tostring(vim.version())
Problem: tostring(vim.version()) returns "table: 0x…". Solution: Modify vim.version() to return a string prerelease instead of a boolean. Fix #23863
Diffstat (limited to 'runtime/lua/vim/version.lua')
-rw-r--r--runtime/lua/vim/version.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/lua/vim/version.lua b/runtime/lua/vim/version.lua
index 5578423453..92250ff1f8 100644
--- a/runtime/lua/vim/version.lua
+++ b/runtime/lua/vim/version.lua
@@ -425,7 +425,7 @@ setmetatable(M, {
__call = function()
local version = vim.fn.api_info().version
-- Workaround: vim.fn.api_info().version reports "prerelease" as a boolean.
- version.prerelease = version.prerelease or nil
+ version.prerelease = version.prerelease and 'dev' or nil
return setmetatable(version, Version)
end,
})