Skip to content

Commit

Permalink
revert: add auto close for popup back
Browse files Browse the repository at this point in the history
  • Loading branch information
jellydn committed Oct 27, 2024
1 parent 4b86f35 commit e27b908
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion lua/hurl/popup.lua
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,15 @@ M.show = function(data, type)
if _HURL_GLOBAL_CONFIG.auto_close then
for _, popup in pairs(popups) do
popup:on(event.BufLeave, function()
layout:unmount()
vim.schedule(function()
local current_buffer = vim.api.nvim_get_current_buf()
for _, p in pairs(popups) do
if p.bufnr == current_buffer then
return
end
end
layout:unmount()
end)
end)
end
end
Expand Down

0 comments on commit e27b908

Please sign in to comment.