Skip to content

Commit def3865

Browse files
committed
fix: wrap throw with vim.schedule
1 parent ada870e commit def3865

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

lua/pkgm/manager.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,9 @@ function Manager:download_package(url, on_finished)
173173

174174
downloader:download(function(downloaded_file, err)
175175
if not downloaded_file then
176-
err_util.throw(err or 'Download failed')
176+
vim.schedule(function()
177+
err_util.throw(err or 'Download failed')
178+
end)
177179
end
178180

179181
log.debug('Downloaded to:', downloaded_file)

0 commit comments

Comments
 (0)