feat(sidebar): move quit and close key mappings into config values. (#979)
This commit is contained in:
parent
692c168e5b
commit
0a273c2f5d
lua/avante
@ -197,6 +197,7 @@ M._defaults = {
|
||||
reverse_switch_windows = "<S-Tab>",
|
||||
remove_file = "d",
|
||||
add_file = "@",
|
||||
close = { "<Esc>", "q" },
|
||||
},
|
||||
files = {
|
||||
add_current = "<leader>ac", -- Add current buffer to selected files
|
||||
|
@ -2138,12 +2138,7 @@ function Sidebar:render(opts)
|
||||
xpcall(function() api.nvim_buf_set_name(self.result_container.bufnr, RESULT_BUF_NAME) end, function(_) end)
|
||||
end)
|
||||
|
||||
self.result_container:map("n", "q", function()
|
||||
Llm.cancel_inflight_request()
|
||||
self:close()
|
||||
end)
|
||||
|
||||
self.result_container:map("n", "<Esc>", function()
|
||||
self.result_container:map("n", Config.mappings.sidebar.close, function()
|
||||
Llm.cancel_inflight_request()
|
||||
self:close()
|
||||
end)
|
||||
|
Loading…
x
Reference in New Issue
Block a user