From 9487fdfeb5b50ebcd46e644fbdc9d15ac9b9f55d Mon Sep 17 00:00:00 2001 From: Steven Arcangeli Date: Tue, 24 Oct 2023 09:03:16 -0700 Subject: [PATCH] fix: schedule a callback to avoid main loop error --- lua/oil/adapters/trash/freedesktop.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/oil/adapters/trash/freedesktop.lua b/lua/oil/adapters/trash/freedesktop.lua index d07a86fd..3ba211ff 100644 --- a/lua/oil/adapters/trash/freedesktop.lua +++ b/lua/oil/adapters/trash/freedesktop.lua @@ -322,7 +322,7 @@ M.list = function(url, column_defs, cb) if close_err then cb(close_err) else - read_next_trash_dir() + vim.schedule(read_next_trash_dir) end end) end