I am currently adding keymaps to close the commit log panel using:
vim.api.nvim_create_autocmd('BufWinEnter', {
group = vim.api.nvim_create_augroup('DiffviewCommitLogPanel', { clear = true }),
pattern = 'diffview://*/log/*/commit_log',
desc = 'Map keys to close the diffview commit log panel',
callback = function(args)
vim.keymap.set('n', 'q', '<CMD>q<CR>', { buffer = args.buf, desc = 'Close the panel' })
vim.keymap.set('n', '<ESC>', '<CMD>q<CR>', { buffer = args.buf, desc = 'Close the panel' })
end,
})
- Is there a
log.close fn I can use instead of <CMD>q<CR>?
- WDYT about adding these 2 shortcuts to default
keymaps under commit_log_panel similar to help_panel?
Previous work: sindrets#482, but I think it's wrong.
I am currently adding keymaps to close the commit log panel using:
log.closefn I can use instead of<CMD>q<CR>?keymapsundercommit_log_panelsimilar tohelp_panel?Previous work: sindrets#482, but I think it's wrong.