[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: |
Thu, 20 Aug 2020 16:27:23 -0400 |
User-agent: |
NeoMutt/20170113 (1.7.2) |
On Thu, Aug 20, 2020 at 09:43:22PM +0300, Roumen Petrov wrote:
> Hello,
>
> As maintainer of a terminal application, now I'm interesting in quality of
> emulation. For tests I use various sources and one of them is ncurses. Few
> months ago I commit one correction "do not restrict cursor movements(up/down)
> to scroll region if set" inspired from ncurses demo program "rain".
> I would like to discuss one of terminal tests part of commit.
>
> In general the tests scenario is: clear screen, set margins, set cursor
> position, output L1, move cursor, output L2, output some text lines with
> <eol>.
> Interesting is following test: cursor-down2 (
> https://gitlab.com/termapps/termoneplus/-/blob/master/tests/cursor-down2 )
> With this test my expectation is:
> -------------------
> <empty line>
> <empty line>
> <empty line>
> L1
> text2
> text3
> <PS1 prompt>
> L2text1
> <... empty lines ...>
> -------------------
> and this is now output in "TermOne Plus".
looks like a bug in "TermOne Plus" :-)
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.
> Unfortunately in xterm and konsole result is:
> -------------------
>
>
> L1L2text1
> text2
> text3
> <PS1 prompt>
> <... empty lines ...>
> -------------------
>
> I wonder what is expected result?
> Did I miss some rules when cursor is moved down? Reference to documentation
> could be very helpfull.
>
>
> Regards,
> Roumen Petrov
>
>
--
Thomas E. Dickey <dickey@invisible-island.net>
https://invisible-island.net
ftp://ftp.invisible-island.net
signature.asc
Description: PGP signature