From 7cde1ca834ff421f2545ccbc10d282b6a6290263 Mon Sep 17 00:00:00 2001 From: fdschmidt93 <39233597+fdschmidt93@users.noreply.github.com> Date: Thu, 28 Apr 2022 15:37:01 +0200 Subject: [PATCH] fix(actions): don't exec pre or post if replaced (#1892) --- lua/telescope/actions/mt.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/telescope/actions/mt.lua b/lua/telescope/actions/mt.lua index 804d972..07b1e42 100644 --- a/lua/telescope/actions/mt.lua +++ b/lua/telescope/actions/mt.lua @@ -57,7 +57,7 @@ action_mt.create = function() if t._static_pre[action_name] then t._static_pre[action_name](...) end - if t._pre[action_name] then + if vim.tbl_isempty(t._replacements) and t._pre[action_name] then t._pre[action_name](...) end @@ -71,7 +71,7 @@ action_mt.create = function() if t._static_post[action_name] then t._static_post[action_name](...) end - if t._post[action_name] then + if vim.tbl_isempty(t._replacements) and t._post[action_name] then t._post[action_name](...) end end