"Sticks and stone can break my bones, but commands can really kill me..." or did I get that wrong. ;)
Having thought about this quite a bit I have come to the conclusion that no real method can be used to fix 'where' a command is displayed as it is sent. Any method used to fix it is likely to only make matters worse. However, I have also come to the conclusion that there is a serious flaw in your programs logic with respect to how incoming text is handled. Currently it seems that mushclient will read data in, attempting to match it to triggers and then when interupted treats the command as a CR-LF recieved from the stream. This is of course because necessity both the inbound and outbound data must be displayed in the same output window, but outbound text should not interfer with the structure or nature of the inbound data imho. For triggers to work reliably they either need to ignore any changes that a sent command may make to the apparent output displayed or process the incoming stream in parallel and seperate from what the rest of the client may be doing. The current method does neither and in some situations can fail to work at annoying or even, from a game playing point of view, dangerous times.
Fixing this may require a slight change to the way that color triggers work, but would require mearly coloring all lines across which the trigger text was broken. A situation that would be far easier to test for and handle than preventing such breaks from happening to begin with (I haven't noticed it break across more than two lines anyway, though I can't be sure.). It would likely require little more than setting a flag when a command is sent, checking to see if it is set when a color trigger match is found, and otherwise setting it back to false after all triggers are processed. Something similar would probably be needed for 'omit from output', but in both cases mearly keeping track of when the collision happened and coloring/removing the text is all that is necessary. In fact making the omit work right would be little more than deleting the buffered text on the split lines (but not the command) and performing a quick refresh of the display.
I unfortunately can't think of any better solution, since the only other option would be to cause normal triggers to work 'across' those false breaks and leave color triggers with their current behaviour (and an appropriate warning about it in the docs). Since you can now have more than one that matches on the same thing, the color trigger could simply color the line, while the duplicate does any other things like sending text, calling scripting, etc. This however won't work with 'omit from output', which I assume suffers from the same problem.
NOTE:
For anyone who wonders why any of this would be necessary.. the problem with simple fixing when/how commands display has to deal with the client being able to tell when an end of line is. In general that is only possible in two cases, when mushclient auto-wraps a long line itself or it recieves a charage return. On prompt lines where the mud waits for user input there is no CR-LF sent from the mud, so you would be relying on the CR-LF from the 'next' line recieved and that would probably make things worse. It still remains a possible option, but would mean that the command you sent would appear as:
A Tiny Room
south
This very small room...
instead of
south
A Tiny Room
This very small room...
and I don't think that would make a lot of sense.
Having thought about this quite a bit I have come to the conclusion that no real method can be used to fix 'where' a command is displayed as it is sent. Any method used to fix it is likely to only make matters worse. However, I have also come to the conclusion that there is a serious flaw in your programs logic with respect to how incoming text is handled. Currently it seems that mushclient will read data in, attempting to match it to triggers and then when interupted treats the command as a CR-LF recieved from the stream. This is of course because necessity both the inbound and outbound data must be displayed in the same output window, but outbound text should not interfer with the structure or nature of the inbound data imho. For triggers to work reliably they either need to ignore any changes that a sent command may make to the apparent output displayed or process the incoming stream in parallel and seperate from what the rest of the client may be doing. The current method does neither and in some situations can fail to work at annoying or even, from a game playing point of view, dangerous times.
Fixing this may require a slight change to the way that color triggers work, but would require mearly coloring all lines across which the trigger text was broken. A situation that would be far easier to test for and handle than preventing such breaks from happening to begin with (I haven't noticed it break across more than two lines anyway, though I can't be sure.). It would likely require little more than setting a flag when a command is sent, checking to see if it is set when a color trigger match is found, and otherwise setting it back to false after all triggers are processed. Something similar would probably be needed for 'omit from output', but in both cases mearly keeping track of when the collision happened and coloring/removing the text is all that is necessary. In fact making the omit work right would be little more than deleting the buffered text on the split lines (but not the command) and performing a quick refresh of the display.
I unfortunately can't think of any better solution, since the only other option would be to cause normal triggers to work 'across' those false breaks and leave color triggers with their current behaviour (and an appropriate warning about it in the docs). Since you can now have more than one that matches on the same thing, the color trigger could simply color the line, while the duplicate does any other things like sending text, calling scripting, etc. This however won't work with 'omit from output', which I assume suffers from the same problem.
NOTE:
For anyone who wonders why any of this would be necessary.. the problem with simple fixing when/how commands display has to deal with the client being able to tell when an end of line is. In general that is only possible in two cases, when mushclient auto-wraps a long line itself or it recieves a charage return. On prompt lines where the mud waits for user input there is no CR-LF sent from the mud, so you would be relying on the CR-LF from the 'next' line recieved and that would probably make things worse. It still remains a possible option, but would mean that the command you sent would appear as:
A Tiny Room
south
This very small room...
instead of
south
A Tiny Room
This very small room...
and I don't think that would make a lot of sense.