I've noticed that there's no action or otherwise that would allow one to quickly close the CommitLogView through e.g. Esc or similar keys. Currently it seems like that the only option would to be type in :q every time, which is rather unpractical. Additionally the CommitLogView class also doesn't seem to have a mechanism already which would allow configuring such behavior easily through the keymap config.
I've (for now) build a workaround, which registers a hook, but I feel like this should at best be a default behavior or at least an action.
hooks = {
view_opened = function (view)
if view.commit_log_panel then
local opt = { desc = "Close commit log panel", buffer = view.commit_log_panel.bufid }
vim.keymap.set("n", "<ESC>", function()view.commit_log_panel:close()end, opt)
end
end,
}
Hi there,
I've noticed that there's no action or otherwise that would allow one to quickly close the CommitLogView through e.g. Esc or similar keys. Currently it seems like that the only option would to be type in
:q
every time, which is rather unpractical. Additionally the CommitLogView class also doesn't seem to have a mechanism already which would allow configuring such behavior easily through the keymap config.I've (for now) build a workaround, which registers a hook, but I feel like this should at best be a default behavior or at least an action.
With best regards Tyalie