Skip to content

Commit c1bcf50

Browse files
committed
fix: kill vimscript
1 parent 637b919 commit c1bcf50

File tree

2 files changed

+3
-17
lines changed

2 files changed

+3
-17
lines changed

lua/popup/init.lua

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
--- Hope to get this part merged in at some point in the future.
55

66
local Border = require("plenary.window.border")
7+
local Window = require("plenary.window")
78
local utils = require("popup.utils")
89

910
local popup = {}
@@ -181,7 +182,7 @@ function popup.create(what, vim_options)
181182
local silent = false
182183
vim.cmd(
183184
string.format(
184-
"autocmd BufLeave,BufDelete %s <buffer=%s> ++nested call popup#close_win(%s, v:true)",
185+
"autocmd BufLeave,BufDelete %s <buffer=%s> ++nested :lua require('plenary.window').try_close(%s, true)",
185186
(silent and "<silent>") or '',
186187
bufnr,
187188
win_id
@@ -192,7 +193,7 @@ function popup.create(what, vim_options)
192193
if vim_options.time then
193194
local timer = vim.loop.new_timer()
194195
timer:start(vim_options.time, 0, vim.schedule_wrap(function()
195-
vim.fn['popup#close_win'](win_id, false)
196+
Window.try_close(win_id, false)
196197
end))
197198
end
198199

plugin/popup.vim

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)