mirror of https://github.com/folke/lazy.nvim.git
fix(ui): trailing space in button row. Fixes #884
This commit is contained in:
parent
56b1f7715e
commit
410a7360c1
|
@ -113,8 +113,11 @@ end
|
|||
|
||||
function M:title()
|
||||
self:nl():nl()
|
||||
for _, mode in ipairs(ViewConfig.get_commands()) do
|
||||
if mode.button then
|
||||
local modes = vim.tbl_filter(function(c)
|
||||
return c.button
|
||||
end, ViewConfig.get_commands())
|
||||
|
||||
for c, mode in ipairs(modes) do
|
||||
local title = " " .. mode.name:sub(1, 1):upper() .. mode.name:sub(2) .. " (" .. mode.key .. ") "
|
||||
if mode.name == "home" then
|
||||
if self.view.state.mode == "home" then
|
||||
|
@ -135,8 +138,10 @@ function M:title()
|
|||
self:append(title, "LazyButton", { wrap = true })
|
||||
self:highlight({ ["%(.%)"] = "LazySpecial" })
|
||||
end
|
||||
self:append(" ")
|
||||
if c == #modes then
|
||||
break
|
||||
end
|
||||
self:append(" ")
|
||||
end
|
||||
self:nl()
|
||||
if self.progress.done < self.progress.total then
|
||||
|
|
Loading…
Reference in New Issue