From 98bf13267e2d60430ba36a35ae0c705d066c4f25 Mon Sep 17 00:00:00 2001 From: Matěj Cepl Date: Mon, 11 Jul 2022 01:39:14 +0200 Subject: p_arg should be just a number, not string. --- init.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/init.lua b/init.lua index 793a9d3..65a7991 100644 --- a/init.lua +++ b/init.lua @@ -128,7 +128,8 @@ end function new_segment(segment, p_arg) if next(segment) then - local new_text = run_shell_cmd(M.par_prg, M.ex_args() .. p_arg, + print("M.par_prg = " .. M.par_prg .. ", M.ex_args = " .. M.ex_args() .. ", p_arg = " .. p_arg) + local new_text = run_shell_cmd(M.par_prg, M.ex_args() .. "p" .. p_arg, table.concat(segment, "\n")) print("new_text = " .. new_text) return new_text, {}, 0 -- add-to-out, segment, p_arg @@ -161,7 +162,7 @@ vis:operator_new( seg_pared, segment, p_arg = new_segment(segment, p_arg) if seg_pared then out = out .. seg_pared - p_arg = "p" .. hang_sym + p_arg = hang_sym end table.insert(segment, line) else -- cgit