mirror of
https://github.com/folke/snacks.nvim
synced 2025-08-05 03:08:13 +00:00
fix(scratch): make sure win.opts.keys exists. See #190
This commit is contained in:
parent
630d96cf1f
commit
50bd5103ba
1 changed files with 1 additions and 0 deletions
|
@ -232,6 +232,7 @@ function M.open(opts)
|
|||
local function reset()
|
||||
vim.api.nvim_buf_set_lines(buf, 0, -1, false, vim.split(opts.template, "\n"))
|
||||
end
|
||||
opts.win.keys = opts.win.keys or {}
|
||||
opts.win.keys.reset = { "R", reset, desc = "Reset buffer" }
|
||||
if is_new then
|
||||
reset()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue