fix(actions): don't exec pre or post if replaced (#1892)

This commit is contained in:
fdschmidt93
2022-04-28 15:37:01 +02:00
committed by GitHub
parent 4449f709c3
commit 7cde1ca834

View File

@@ -57,7 +57,7 @@ action_mt.create = function()
if t._static_pre[action_name] then if t._static_pre[action_name] then
t._static_pre[action_name](...) t._static_pre[action_name](...)
end end
if t._pre[action_name] then if vim.tbl_isempty(t._replacements) and t._pre[action_name] then
t._pre[action_name](...) t._pre[action_name](...)
end end
@@ -71,7 +71,7 @@ action_mt.create = function()
if t._static_post[action_name] then if t._static_post[action_name] then
t._static_post[action_name](...) t._static_post[action_name](...)
end end
if t._post[action_name] then if vim.tbl_isempty(t._replacements) and t._post[action_name] then
t._post[action_name](...) t._post[action_name](...)
end end
end end