aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/eval.lua6
1 files changed, 5 insertions, 1 deletions
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,
})