bug-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cursor movements within scrolling regions


From: Roumen Petrov
Subject: Re: cursor movements within scrolling regions
Date: Sun, 23 Aug 2020 16:39:40 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0 SeaMonkey/2.53.3

Thomas Dickey wrote:
On Thu, Aug 20, 2020 at 09:43:22PM +0300, Roumen Petrov wrote:
Hello,

[SNIP]


looks like a bug in "TermOne Plus" :-)

Long story. ;)

Origin code does restrict cursor up-movement to top border and down-movement to 
bottom margin.
Reading vt100 origin code follows exactly vt100 documentation(specification) "CUP – 
Cursor Position ... If an attempt is made to move the cursor above the top margin, the 
cursor stops at the top margin. " but ...


Let scroll is set from 10 to 20 row.
Let cursor position is set on row 5. This look like first issue with 
specification cursor position is not limited to margins.

If move is up from specification cursor has to be moved to row 10.
If move is down specification does not restrict movement and cursor is moved to 
row 6. Why? Why not to row 10?
Origin code does exactly this.
As movement is not logical I decided "do not restrict cursor movements(up/down) to 
scroll region if set" and to investigate further.
Side effect - output of rain program is nice.



Since your example shows L1 and L2 on different lines,
that refers to this part of the script:

        # // ESC [ Pn B - Cursor Down
        echo -n "L1${CSI}BL2"

According to this (which is describing a feature unchanged
since the VT100 model):

https://www.vt100.net/docs/vt510-rm/CUD.html

        This control function moves the cursor down a specified number of lines
        in the same column.  The cursor stops at the bottom margin.  If the
        cursor is already below the bottom margin, then the cursor stops at the
        bottom line.
[SNIP]

Thanks.
This is exactly what I'm looking for. With other words ambiguity VT-100 
specification is replaced with precise wording.

Rule "do not cross border" is logical.
For instance if move is down border could be bottom margin or bottom line, 
depends from cursor position.


Thanks again, issue with cursor movements in "TermOne Plus" finally is closed, 
code is in compliance with vt510, added few more tests.
(new release was published today)


Regards,
Roumen Petrov



reply via email to

[Prev in Thread] Current Thread [Next in Thread]