Skip to content

Commit 582d7b6

Browse files
committed
feat(calendar): unify exit keybind to always be q instead of a mix of q/<Esc>
1 parent 99dd721 commit 582d7b6

File tree

1 file changed

+6
-3
lines changed
  • lua/neorg/modules/core/ui/calendar/views/monthly

1 file changed

+6
-3
lines changed

lua/neorg/modules/core/ui/calendar/views/monthly/module.lua

+6-3
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,6 @@ module.private = {
556556
end
557557

558558
vim.keymap.set("n", "q", quit, { buffer = buffer })
559-
vim.keymap.set("n", "<Esc>", quit, { buffer = buffer })
560559

561560
vim.api.nvim_create_autocmd({ "BufLeave", "WinLeave" }, {
562561
buffer = buffer,
@@ -586,6 +585,10 @@ module.public = {
586585
view:render_view(ui_info, date, nil, options)
587586

588587
do
588+
vim.keymap.set("n", "q", function()
589+
vim.api.nvim_buf_delete(ui_info.buffer, { force = true })
590+
end, { buffer = ui_info.buffer })
591+
589592
-- TODO: Make cursor wrapping behaviour configurable
590593
vim.keymap.set("n", "l", function()
591594
local new_date = reformat_time({
@@ -901,7 +904,7 @@ module.public = {
901904
"?",
902905
lib.wrap(module.private.display_help, {
903906
{
904-
{ "q/<Esc>", "@namespace" },
907+
{ "q", "@namespace" },
905908
{ " - " },
906909
{ "close this window", "@text.strong" },
907910
},
@@ -1041,7 +1044,7 @@ module.public = {
10411044
"?",
10421045
lib.wrap(module.private.display_help, {
10431046
{
1044-
{ "<Esc>", "@namespace" },
1047+
{ "q", "@namespace" },
10451048
{ " - " },
10461049
{ "close this window", "@text.strong" },
10471050
},

0 commit comments

Comments
 (0)