\033[<r1>;<r2>r sets the scrolling region, from row <r1> to row <r2>
When you write to the last line of the scrolling region,
(move your cursor with \033[<row>;<col>H escape sequence)
it scrolls the whole scrolling region.
When you print outside the region, the previous text stays there,
so be sure to clear the line ( \033[K to eol or \033[2K the whole line)
I usually send \033c (no backets) at the beginning and the end of the
entire session to reset the users' terminal.
If you print something to the scrolling region when they are typing in a
region that is non scrolling, be sure to save the cursor position (
\0337 no brackets) before printing and restore cursor position ( \0338 )
after printing, so their keystrokes continue to go to places you want
them to go.
This is my experience from working on BBS-style server. Hope this helps.
Htam
Richard Lindsey wrote:
Now i have a question for the list as well :) I've spent the last few hours raiding the internet in search of this, with no luck yet... I could've sworn there was an ansi escape code for splitting the window into 2 sections, the lower one being able to stay fixed in place, while the upper one kept scrolling with output to the character... and I know i've seen this on another mud before, but i have yet to find the escape code to do this, or at least one that i can tell by the description is the one that does this... anyone know how to split the screen? I'd like to section off the bottom 2 or 3 lines and maybe put some kind of status bar on the topmost of those lines, and leave the last line or 2 as a fixed line that the player could type in without having their text broken up by continuous scrolling from the mud (i'm sure you know how annoying it is to try to manually align a note or whatever by eyeballing it, only to have the mud scroll)... i hope someone has the answer to
this, thanks in advance :)
wavewave
Richard Lindsey.
D?&j)b? b??N2?&??!???0????܂&??Y???b?ا~??om==