Hello, thanks for the plugin.
Using it and updated to the last release with luarocks dependency and the other updates I get an error on the result highlight of the winbar.
Due to this part of the code
|
local hl_fg = string.format("%02X", vim.api.nvim_get_hl(0, { name = name, link = false }).fg) |
|
if #hl_fg == 5 then |
|
hl_fg = "0" .. hl_fg |
|
end |
|
hl_fg = "#" .. hl_fg |
|
return hl_fg |
when the Hex value of the highlight contains two prefixed zeros (example #00FF87) it doesn’t match to any of the if statement since you’re checking if the chars left after the format are 5, but in this case they are 4.
In the most simple way is enough to do another check and have something like this
local hl_fg = string.format("%02X", vim.api.nvim_get_hl(0, { name = name, link = false }).fg)
if #hl_fg == 4 then
hl_fg = "00" .. hl_fg
elseif #hl_fg == 5 then
hl_fg = "0" .. hl_fg
end
hl_fg = "#" .. hl_fg
return hl_fg
Hello, thanks for the plugin.
Using it and updated to the last release with
luarocksdependency and the other updates I get an error on the result highlight of the winbar.Due to this part of the code
rest.nvim/lua/rest-nvim/result/winbar.lua
Lines 64 to 69 in 5300ae0
when the Hex value of the highlight contains two prefixed zeros (example
#00FF87) it doesn’t match to any of the if statement since you’re checking if the chars left after the format are 5, but in this case they are 4.In the most simple way is enough to do another check and have something like this