fix: close the hints popup when switching to another buffer (#180)

This commit is contained in:
yetone
2024-08-24 00:21:00 +08:00
committed by GitHub
parent 7bea73eb80
commit 964c4621f6

View File

@@ -95,6 +95,16 @@ function Selection:setup_autocmds()
end
end,
})
api.nvim_create_autocmd({ "BufLeave" }, {
group = self.augroup,
callback = function(ev)
if not Utils.is_sidebar_buffer(ev.buf) then
self:close_hints_popup()
end
end,
})
return self
end