Skip to content

Commit

Permalink
fix(view): display actual scroll up/down keys in help (#821)
Browse files Browse the repository at this point in the history
## Description

The footer section of WhichKey window displays help for built-in keys
(Esc, BS, scroll up and down). The scroll keys are configurable, however
the help message always displays the hard-coded default values.
  • Loading branch information
taketwo authored Aug 31, 2024
1 parent 946dddc commit dafe27a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/which-key/view.lua
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ function M.show()
keys[#keys + 1] = { key = "<bs>", desc = "back" }
end
if opts.height < text:height() then
keys[#keys + 1] = { key = "<c-d>/<c-u>", desc = "scroll" }
keys[#keys + 1] = { key = Config.keys.scroll_down .. "/" .. Config.keys.scroll_up, desc = "scroll" }
end
local help = Text.new()
for k, key in ipairs(keys) do
Expand Down

0 comments on commit dafe27a

Please sign in to comment.