Skip to content

Commit

Permalink
fix: delay when using q to close (#311)
Browse files Browse the repository at this point in the history
* fix: delay when using `q` to close

* fix: remove delay on custom keymaps as well
  • Loading branch information
chrisgrieser committed Oct 14, 2023
1 parent 6573d6e commit 5f6de33
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lua/aerial/keymap_util.lua
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ M.set_keymaps = function(mode, action_module, keymaps, bufnr, ...)
_rhs(vim.F.unpack_len(args))
end
end
vim.keymap.set(mode, k, rhs, vim.tbl_extend("keep", { buffer = bufnr }, opts))
vim.keymap.set(mode, k, rhs, vim.tbl_extend("keep", { buffer = bufnr, nowait = true }, opts))
end
end
end
Expand Down Expand Up @@ -85,7 +85,7 @@ M.show_help = function(action_module, keymaps)
hl_group = hl_group,
})
end
vim.keymap.set("n", "q", "<cmd>close<CR>", { buffer = bufnr })
vim.keymap.set("n", "q", "<cmd>close<CR>", { buffer = bufnr, nowait = true })
vim.keymap.set("n", "<c-c>", "<cmd>close<CR>", { buffer = bufnr })
vim.api.nvim_buf_set_option(bufnr, "modifiable", false)
vim.api.nvim_buf_set_option(bufnr, "bufhidden", "wipe")
Expand Down

0 comments on commit 5f6de33

Please sign in to comment.