Skip to content

Commit 8f128cc

Browse files
committed
fix: Only run closing autocmd once
1 parent 732ab8e commit 8f128cc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lua/popup/init.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ function popup.create(what, vim_options)
199199
local silent = false
200200
vim.cmd(
201201
string.format(
202-
"autocmd BufLeave,BufDelete %s <buffer=%s> ++nested :lua require('plenary.window').try_close(%s, true)",
202+
"autocmd BufLeave,BufDelete %s <buffer=%s> ++once ++nested :lua require('plenary.window').try_close(%s, true)",
203203
(silent and "<silent>") or '',
204204
bufnr,
205205
win_id

0 commit comments

Comments
 (0)