aboutsummaryrefslogtreecommitdiff
path: root/plugins/eval.lua
diff options
context:
space:
mode:
authorjgmdev <jgmdev@gmail.com>2022-03-11 06:53:37 -0400
committerjgmdev <jgmdev@gmail.com>2022-05-22 13:16:10 -0400
commit2705f3ef88fe72318e3c3d7e78d53a1b6f486849 (patch)
tree79f178a0f926bf91922714bcf7a4ce8a698b335b /plugins/eval.lua
parent94bfa9a0e44b29836d933652db539d93d822704e (diff)
downloadlite-xl-plugins-2705f3ef88fe72318e3c3d7e78d53a1b6f486849.tar.gz
lite-xl-plugins-2705f3ef88fe72318e3c3d7e78d53a1b6f486849.zip
eval: fixed eval:replace command
Diffstat (limited to 'plugins/eval.lua')
-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,
})