Skip to content

Commit

Permalink
fix: highlighting of line number in marks
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Apr 28, 2021
1 parent f989fcf commit 9997d93
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions lua/which-key/layout.lua
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ function Layout:trail()
table.insert(help_line, { label .. " ", "WhichKeySeperator" })
end
table.insert(cmd_line, { string.rep(" ", math.floor(vim.o.columns / 2 - help_width / 2) - width) })

for _, l in pairs(help_line) do table.insert(cmd_line, l) end
vim.api.nvim_echo(cmd_line, false, {})
end
Expand Down
4 changes: 2 additions & 2 deletions lua/which-key/plugins/marks.lua
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ function M.run(trigger, mode, buf)

local file = mark.file and vim.fn.fnamemodify(mark.file, ":p:.")

local value = string.format("%3d ", lnum) .. (line or file)
local value = string.format("%4d ", lnum)

table.insert(items, {
key = key,
label = labels[key] or "",
value = value,
value = value .. (line or file),
highlights = { { 1, #value - 1, "Number" } },
})
end
Expand Down

0 comments on commit 9997d93

Please sign in to comment.