From 82457207eff56f31a995917fed09df5dad1f2751 Mon Sep 17 00:00:00 2001 From: bhagwan Date: Tue, 6 Feb 2024 06:28:26 -0800 Subject: [PATCH] fix(actions): ignore swap file dialog (closes #1011) --- lua/fzf-lua/core.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lua/fzf-lua/core.lua b/lua/fzf-lua/core.lua index f82d2ae2c..f5c2f1ef3 100644 --- a/lua/fzf-lua/core.lua +++ b/lua/fzf-lua/core.lua @@ -192,6 +192,11 @@ M.fzf_wrap = function(opts, contents, fn_selected) xpcall(function() opts.fn_selected(selected, opts) end, function(err) + -- ignore existing swap file error, the choices dialog will still be + -- displayed to user to make a selection once fzf-lua exits (#1011) + if err:match("Vim%(edit%):E325") then + return + end utils.err("fn_selected threw an error: " .. debug.traceback(err, 1)) end) end