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

Bug#254632: xterm update results in worse thread view in mutt running inside a GNU screen



On Tue, Jun 22, 2004 at 03:48:49AM +0200, Adrian Bunk wrote:
> The typescript file is attached.

It does show that screen isn't issuing the initialization string.
And in setting out to explain the results, I see the problem (the termcap).

Here's a readable version of the typescript from covering the initialization
through the first use of line-drawing text:

\n$ screen -r m\r
\n
\E7
\E[?47h
\E7
\E[r
\E[m
\E[?7h
\E[?1;3;4;6l
\E[4l
\E8
\E>
\E[4l
\E[?1h
\E=
\E[m^O
\E[1;76r
\E[H
\E[2J
\E[H
\E[2J
\E[7mq:Quit  d:Del  u:Undel  s:Save  c:Mail    g:Group  ?:Help                       \rq:Q
\n
\E[m1
\E[5COct 16 Florian_Oelmaie ( 110) Antwort:  Verst\344ndnisproblem zum Thema op\r   
\n2
\E[5COct 16 Peter Wintrich  (  25) ^Ntq^O>\r   
\n3

A big chunk comes from the termcap initialization string (and has nothing
to do with line-drawing, so we can ignore that):

        :is=\E7\E[r\E[m\E[?7h\E[?1;3;4;6l\E[4l\E8\E>:\

What's left consists mostly of cursor movement (\E[H), clearing (\E[J), some
text - and ^N/^O to turn on line-drawing temporarily.  What I don't see is a
string such as \E)0.  Referring to ctlseqs.ms

SO             Shift Out (Ctrl-N) -> Switch to Alternate Character Set:
               invokes the G1 character set.

ESC ) C        Designate G1 Character Set (ISO 2022)
                 C = 0  -> DEC Special Character and Line Drawing Set

This was not noticeable before #182, since xterm's initialization did
that (incorrectly).  Fixing xterm exposed this error.

The termcap should have a string such as

	:eA=\E)0:

which would tell screen how to initialize the alternate character set.

Here's a diff of NetBSD's termcap which shows when the bug was added:

> diff netbsd.tc-1.53 netbsd.tc-1.52
1c1
< #     $NetBSD: termcap.src,v 1.53 2000/04/16 01:27:44 mycroft Exp $
---
> #     $NetBSD: termcap.src,v 1.52 2000/02/14 05:41:11 jun Exp $
1745,1747c1745
<       :RI=\E[%dC:UP=\E[%dA:\
<       :ac=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~:\
<       :ae=^O:al=\E[L:as=^N:bl=^G:cd=\E[J:\
---
>       :RI=\E[%dC:UP=\E[%dA:ae=^O:al=\E[L:as=^N:bl=^G:cd=\E[J:\
1782c1780
<       :tc=xterm-xf86-v33:
---
>       :tc=xterm-r6:

See that 1.53 adds some of the line-drawing features, but omits "eA".

The termcap that comes with xterm has no line-drawing (to fit in 1023
bytes, you must choose features from line-drawing, color and function
keys).  This change was from another source.  It doesn't appear to be
copied from the termcaps I'm maintaining for ncurses.  Anyway, it's
a NetBSD bug (appears to be in the current 1.84 file).

-- 
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net

Attachment: pgpGBllZAOird.pgp
Description: PGP signature


Reply to: