From 2705f3ef88fe72318e3c3d7e78d53a1b6f486849 Mon Sep 17 00:00:00 2001 From: jgmdev Date: Fri, 11 Mar 2022 06:53:37 -0400 Subject: eval: fixed eval:replace command --- plugins/eval.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'plugins/eval.lua') diff --git a/plugins/eval.lua b/plugins/eval.lua index cfcdf0b..7658298 100644 --- a/plugins/eval.lua +++ b/plugins/eval.lua @@ -19,6 +19,10 @@ command.add("core.docview", { end, ["eval:replace"] = function() - core.active_view.doc:replace(eval) + core.command_view:enter("Evaluate And Replace With Result", function(cmd) + core.active_view.doc:replace(function(str) + return eval(cmd) + end) + end) end, }) -- cgit v1.2.3