Skip to content

Commit a06bb97

Browse files
authored
fix: close the hint win when the input win is closed (#1734)
1 parent 0b4a493 commit a06bb97

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lua/avante/sidebar.lua

+8
Original file line numberDiff line numberDiff line change
@@ -3058,6 +3058,14 @@ function Sidebar:create_input_container(opts)
30583058
callback = function() close_hint() end,
30593059
})
30603060

3061+
api.nvim_create_autocmd("WinClosed", {
3062+
group = self.augroup,
3063+
callback = function(args)
3064+
local closed_winid = tonumber(args.match)
3065+
if closed_winid == self.input_container.winid then close_hint() end
3066+
end,
3067+
})
3068+
30613069
api.nvim_create_autocmd("BufEnter", {
30623070
group = self.augroup,
30633071
buffer = self.input_container.bufnr,

0 commit comments

Comments
 (0)