I think it should just be displayed as \n instead of being interpreted?
"sox $1 $2 repeat 2",
"sox $1 $2 repeat 2 \n sox $1 $2 repeat 2",
"sox $1 $2 speed 1200c",
=>
I think it should just be displayed as \n instead of being interpreted?
"sox $1 $2 repeat 2",
"sox $1 $2 repeat 2 \n sox $1 $2 repeat 2",
"sox $1 $2 speed 1200c",
=>
Doesn’t make sense to add newlines in there, so you have to remve them either way?
I think he wants to perform two actions with one choice, but this has to be resolved by setting up a different table that represents the different choice. The table that gets visualized in the drop-down will then show one line and the other table will contain the multi-command line.
Some visual hints to give you a basic concept:
–Global definition
table_ref = {“my command 1”, “My command 2 \n my second command 2”, “my command 3”}
table_visu = {}
–Setting the items in the visual object
vb:popup{
id = ‘table_visu’,
items= {“option1”,“option2”,“option3”}
}
–conversion
local my_command = table_ref[vb.views.table_visu.index]
It’s just because I have a table of command presets, and a history of entered commands. The latter constantly updates of course. And while I actually considered giving nicknames to command presets, the history has to be literal and true to the facts so to speak.
Yeah, I’ll try to solve it by creating a copy of the table with the newlines replaced, like vv suggested but on the fly.
But I still think it would be more optimal if it wouldn’t choke so horribly on them, Never assume correct input after all.