[Top][All Lists]

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

Re: ncurses 5.7 set_field_back problem

From: Thomas Dickey
Subject: Re: ncurses 5.7 set_field_back problem
Date: Fri, 02 Dec 2011 20:43:54 -0500
User-agent: Mutt/1.5.18 (2008-05-17)

On Fri, Dec 02, 2011 at 02:27:20PM +0000, Pablo Cazallas Gonzÿffffe1lez wrote:
> "I suppose it's possible - though it would be surprising.  But it is possible
> to test the idea.  Using the "script" program (which is generally available)
> you can run your test program in script and capture the "typescript" file.
> The "typescript" file contains nonprinting characters.  I've a small program
> (see ftp://invisible-island.net/ncurses/unmap.zip) "unmap" which can translate
> that into all printable text.  The "map" program in the same zip-file does
> the reverse.  For example
>     unmap <typescript >readable
>     map <readable >unreadable
> slowcat (another zip-file) prints its output slowly on the terminal, e.g.,
>     slowcat <typescript
> Given a typescript file (or its printable equivalent using unmap), I can
> study it and see if the blinking characters really should appear (or if
> there's a bug to investigate).  If you were to send a typescript file in
> email, then it should be as an attachment of course - it's very hard to
> pick it out of inline mail."
> Attached to this email is the typescript file "blink.log", generated with the 
> "script" UNIX command.I just started the test program "blink" (I sent you the 
> code in earlier emails), wrote some text, and exited it.
> Hope the typescript file could help you to help me with this issue.

The log works as expected for xterm.  At the moment (I'll have more time
tomorrow), I have only the "pterm" (putty on Linux) program to check PuTTY. 
That doesn't support blink, but uses colors to represent it.  With that, I see
a difference in the way it is rendering the fields before text is written on
them: the first field gets colored and the second does not.  This is before
the text is written on the fields.

Reading the trace, it seems that ncurses is using the blinking attribute twice. 
It uses it first to draw the empty fields, and then on each character written
to the fields.

Here is the (readable) form of it drawing the empty fields (and
indicating some trailing blanks on one line):

\E(B             <-- blanks
\E(BNot blinking...:  

The "\E[34X" is an erase control, which is probably clearing the
blinking attribute away from the field.  In the terminal description
for putty, that is this chunk:

The part of the trace where the text is filled in looks the same
for both fields.  I'm guessing that putty gets confused in some
way by the erase control, and simply does the wrong thing.

Given that, the likely fix would be to remove that chunk from
the terminfo.src file for putty, to work around putty's bug.

Thomas E. Dickey <address@hidden>

Attachment: signature.asc
Description: Digital signature

reply via email to

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