fix(hint): make sure to only show hint once (#336)

Signed-off-by: Aaron Pham <contact@aarnphm.xyz>
This commit is contained in:
Aaron Pham 2024-08-28 15:47:29 -04:00 committed by GitHub
parent d622feedfa
commit 3e9021f03c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1008,6 +1008,8 @@ function Sidebar:create_selected_code()
end end
end end
local hint_window = nil
function Sidebar:create_input() function Sidebar:create_input()
if self.input then if self.input then
self.input:unmount() self.input:unmount()
@ -1228,8 +1230,6 @@ function Sidebar:create_input()
end, end,
}) })
local hint_window = nil
-- Close the floating window -- Close the floating window
local function close_hint() local function close_hint()
if hint_window and api.nvim_win_is_valid(hint_window) then if hint_window and api.nvim_win_is_valid(hint_window) then