mirror of
https://github.com/folke/snacks.nvim
synced 2025-08-04 02:38:46 +00:00
fix(dashboard): vim.pesc
for auto keys. Fixes #134
This commit is contained in:
parent
aa38175c00
commit
aebffe535b
1 changed files with 4 additions and 2 deletions
|
@ -7,7 +7,7 @@ local M = setmetatable({}, {
|
|||
})
|
||||
|
||||
local uv = vim.uv or vim.loop
|
||||
math.randomseed(os.time())
|
||||
math.randomseed()
|
||||
|
||||
---@class snacks.dashboard.Item
|
||||
---@field indent? number
|
||||
|
@ -628,7 +628,7 @@ function D:keys()
|
|||
local autokeys = self.opts.autokeys:gsub("[hjklq]", "")
|
||||
for _, item in ipairs(self.items) do
|
||||
if item.key and not item.autokey then
|
||||
autokeys = autokeys:gsub(item.key, "", 1)
|
||||
autokeys = autokeys:gsub(vim.pesc(item.key), "", 1)
|
||||
end
|
||||
end
|
||||
for _, item in ipairs(self.items) do
|
||||
|
@ -1075,4 +1075,6 @@ function M.health()
|
|||
end
|
||||
end
|
||||
|
||||
M.Dashboard = D
|
||||
|
||||
return M
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue