aboutsummaryrefslogtreecommitdiffstats
path: root/init.lua
diff options
context:
space:
mode:
Diffstat (limited to 'init.lua')
-rw-r--r--init.lua13
1 files changed, 8 insertions, 5 deletions
diff --git a/init.lua b/init.lua
index 3725520..25486c0 100644
--- a/init.lua
+++ b/init.lua
@@ -135,16 +135,19 @@ vis:operator_new(
local non_spc_idx = line:len() >= beg_spc_len + 1 and beg_spc_len + 1 or 0
print("non_spc_idx = " .. non_spc_idx)
- if non_spc_idx ~= 0 then -- FIXME This is wrong, no two cycles
- if p_arg == 0 then
- p_arg = "p" .. hanging_symbol(line, non_spc_idx)
- end
+ -- FIXME This is wrong, consider multi item list
+ if p_arg == 0 then
+ p_arg = "p" .. hanging_symbol(line, non_spc_idx)
+ end
+
+ if non_spc_idx ~= 0 then
+ print("line = " .. line)
print("segment = " .. dump(segment) .. ", p_arg = " .. p_arg)
table.insert(segment, line)
else -- this is an empty line, so do whole circus FIXME
if next(segment) then
local new_text = run_shell_cmd(par_prg, ex_args .. p_arg,
- table.concat(segment, "\n"))
+ table.concat(segment, "\n"))
segment = {}
p_arg = 0
out = out .. new_text