mirror of
https://github.com/neovim/neovim.git
synced 2024-09-17 20:58:20 -04:00
fix: tostring(vim.version()) fails if build is NIL #24097
Problem: Since #23925, Version.build may be vim.NIL, which causes tostring() to fail: E5108: Error executing lua E5114: Error while converting print argument #1: …/version.lua:129: attempt to concatenate field 'build' (a userdata value) stack traceback: [C]: in function 'print' [string ":lua"]:1: in main chunk Solution: Handle vim.NIL in Version:__tostring().
This commit is contained in:
parent
08db61b19b
commit
43e76cc346
@ -125,7 +125,7 @@ function Version:__tostring()
|
||||
if self.prerelease then
|
||||
ret = ret .. '-' .. self.prerelease
|
||||
end
|
||||
if self.build then
|
||||
if self.build and self.build ~= vim.NIL then
|
||||
ret = ret .. '+' .. self.build
|
||||
end
|
||||
return ret
|
||||
|
Loading…
Reference in New Issue
Block a user