Yesterday, I was trying to do a simple thing - grab a line from main buffer on a trigger, and move it to a separate mini-console, and also add a command-firing link to that line as well. I have encountered a couple of things that may or may not be recognized as problems by developers, but caused me trouble:
The combination of copy() and paste()/appendBuffer() seems to remove command link info. The command link that I have added to the line via cinsertLink() call was not re-created in the miniconsole. Not sure what the reasoning is, it would be nice to have that copied over as well as formatting etc, in line with overall HTML-like structure of mudlet.
Cursor in miniconsole is not advanced by appendBuffer() To clarify a little further, I was inserting a command link by first executing selectString() to find the right spot for it. In the main buffer, that worked seamlessly, since on trigger the cursor is on the line I am working on - the one that triggered the action. What I found out is that in the miniconsole, selectString() was always searching the very first line of the miniconsole buffer. I was filling the miniconsole with many appendBuffer() calls but the cursor stayed on line 1. Which means that at least this output call doesn't update the cursor position. Did not check if cursor is advanced by echo/cecho etc... Again, do not know if it's intended this way, but it seems it could be more intuitive if the cursor is advanced with new output, same as it is in the main buffer. I am working around this by using getLastLineNumber().
Also, while I am at it
