fix(nvim): do not display vim build version if it's not found
This commit is contained in:
parent
c5d937aedd
commit
cd225b69bb
@ -40,11 +40,18 @@ return {
|
|||||||
type = "text",
|
type = "text",
|
||||||
val = function()
|
val = function()
|
||||||
local version = vim.version()
|
local version = vim.version()
|
||||||
return ("─────── v%s.%s.%s+%s ───────"):format(
|
if version.build ~= vim.NIL then
|
||||||
|
return ("─────── v%s.%s.%s+%s ───────"):format(
|
||||||
|
version.major,
|
||||||
|
version.minor,
|
||||||
|
version.patch,
|
||||||
|
version.build
|
||||||
|
)
|
||||||
|
end
|
||||||
|
return ("─────── v%s.%s.%s ───────"):format(
|
||||||
version.major,
|
version.major,
|
||||||
version.minor,
|
version.minor,
|
||||||
version.patch,
|
version.patch
|
||||||
version.build
|
|
||||||
)
|
)
|
||||||
end,
|
end,
|
||||||
opts = { position = "center", hl = "@boolean" },
|
opts = { position = "center", hl = "@boolean" },
|
||||||
|
Loading…
Reference in New Issue
Block a user