[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Automatic Margins
Re: Automatic Margins
Fri, 3 Apr 2009 20:27:53 -0400 (EDT)
On Fri, 3 Apr 2009, Bryan Christ wrote:
All of this documentation explains the x-axis behavior only. Most
The note about "am" refers to the previous row...
terminals advance the y-axis value after a right margin wrap (move the
cursor down one line). That behavior doesn't seem to be documented
anywhere (or maybe I just keep overlooking it). It could be that this
is just documented, "common knowledge" since most people just expect
that right margin wrap will move the cursor down a line. If so, that's
fine, I just need to know if that same logic applies to cap 'bw'...
"Programs should never attempt to backspace around the left edge, unless
bw is given"
Assuming bw is given, does that mean a left margin wrap decreases the
cursor y axis (moves the cursor up one line)?
That's the common assumption
On Thu, 2009-04-02 at 23:23 +0000, Thomas Dickey wrote:
On Thu, 2 Apr 2009, Bryan Christ wrote:
if capability 'am' is assumed to mean
2. addch() & wrap (am)
then does 'bw' mean..
2. cub1 & wrap (bw)
3. x=width, y=y-1
the behavior that auto_right_margin moves the cursor y+1 is not
documented and auto_left_margin is also not specific.
man 5 terminfo:
auto_left_margin bw bw cub1 wraps from col-
umn 0 to last column
auto_right_margin am am terminal has auto-
All capabilities have names. For instance, the fact that ANSI-standard
terminals have automatic margins (i.e., an automatic return and line-
feed when the end of a line is reached) is indicated by the capability
am. Hence the description of ansi includes am. Numeric capabilities
A very important point here is that the local cursor motions encoded in
terminfo are undefined at the left and top edges of a CRT terminal.
Programs should never attempt to backspace around the left edge, unless
bw is given, and never attempt to go up locally off the top. In order
to scroll text up, a program will go to the bottom left corner of the
screen and send the ind (index) string.
The am capability tells whether the cursor sticks at the right edge of
the screen when text is output, but this does not necessarily apply to
a cuf1 from the last column. The only local motion which is defined
from the left edge is if bw is given, then a cub1 from the left edge
will move to the right edge of the previous row. If bw is not given,
the effect is undefined. This is useful for drawing a box around the
Thomas E. Dickey