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

Re: Annoying behavior in X (broken curses?)

Avery Pennarun <apenwarr@worldvisions.ca> writes:

> Your explanation of the difference (missing ESC[2J) makes perfect sense.
> Now, what is the correct solution?  It seems rather ugly to me that
> the screen-switch code should need a clear-screen code included: what
> if I want to switch back and forth without redrawing? (sounds somewhat
> pointless, but still) Maybe ncurses / joe / the guilty parties should
> be clearing the screen themselves after a switch?

Exactly.  See below.

> In either case, as xterm and rxvt behave identically in this respect,
> both terminfo entries should match.  I'm just not sure which one
> is right.

If you want my opinion, I think that the smcup and rmcup capabilities
(start and end using cup, the cursor addressing capability) should not
blank the alternative screen buffer.  Instead, the application should
explicitly clear the screen and position the cursor itself.  Note that,
for example, nvi, elvis, and emacs all do the right thing, and less is
not a problem since the old screen contents are scrolled out of the way.
IMHO, it is a bug for applications depend on rmcup or smcup positioning
the cursor or clearing the screen.

[ description of mutt and joe errors ]

I think that these are bugs in mutt and joe.  Let's examine joe.
This is an annotated list of what joe sends to the rxvt/xterm window
when it starts:

Processing '/etc/joe/joerc'...done  - it writes this to the screen
ESC [ m		- set the character attributes to normal
Ctrl-O		- switch to the standard character set
ESC [ 1;24 r	- set the scrolling region to the first 24 lines
ESC [ H		- set the cursor position to 1,1 (home the cursor)
ESC [ 2 J	- clear the display
ESC 7		- save the cursor
ESC [ ? 47 h	- switch to the alternative buffer
ESC [ 7 m	- inverse on
   joe then prints the status line

I think that the problem is evident.  Joe is using the smcup (start CUP)
capability, which switches to the alternative screen buffer, after it
has used the clear screen capability, which clears the screen and homes
the cursor.  The order of these two actions should be reversed.

[ description of minicom error ]

I don't see any problems with minicom in rxvt.


TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-devel-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .

Reply to: