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: Thomas Dickey
Subject: Re: cursor movements within scrolling regions
Date: Sun, 23 Aug 2020 13:45:57 -0400
User-agent: NeoMutt/20170113 (1.7.2)

On Sun, Aug 23, 2020 at 04:39:40PM +0300, Roumen Petrov wrote:
> 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. ;)

I spent a few hours yesterday to explain a one-line change :-)
 
> 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.

sounds good.  If xterm had behaved different, I'd spend more time to
see why...
 
> 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
> 

-- 
Thomas E. Dickey <dickey@invisible-island.net>
https://invisible-island.net
ftp://ftp.invisible-island.net

Attachment: signature.asc
Description: PGP signature


reply via email to

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