From 3e9021f03cf382bbb3b28251e7b958df5fe0fc50 Mon Sep 17 00:00:00 2001 From: Aaron Pham Date: Wed, 28 Aug 2024 15:47:29 -0400 Subject: [PATCH] fix(hint): make sure to only show hint once (#336) Signed-off-by: Aaron Pham --- lua/avante/sidebar.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/avante/sidebar.lua b/lua/avante/sidebar.lua index 61ea0fb..c2bf51c 100644 --- a/lua/avante/sidebar.lua +++ b/lua/avante/sidebar.lua @@ -1008,6 +1008,8 @@ function Sidebar:create_selected_code() end end +local hint_window = nil + function Sidebar:create_input() if self.input then self.input:unmount() @@ -1228,8 +1230,6 @@ function Sidebar:create_input() end, }) - local hint_window = nil - -- Close the floating window local function close_hint() if hint_window and api.nvim_win_is_valid(hint_window) then