[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RP] Re: ncurses issues
From: |
Nikolai :: lone-star :: Weibull |
Subject: |
[RP] Re: ncurses issues |
Date: |
Mon Jul 14 10:51:16 2003 |
User-agent: |
Mutt/1.5.4i |
On Thu, Jul 10 2003, Nikolai :: lone-star :: Weibull wrote something resembling:
> Hi. Has anyone ever experienced screen display corruption when running
> ncurses based applications using line-drawing characters? An example
> that (sometimes) produces this behavior is:
> xterm -> screen -> raggle/giFTcurs
> and after switching from it to another (full-sized) window and back the
> display will be all corrupted, with almost all characters replaced with
> really-low-ascii characters (i.e. the characters 0 through 12) (like the
> hearts, clubs, spades, and diamonds card characters).
>
> hope my problem is somewhat clear, and a solution is at hand,
> nikolai
>
gotta love replies to self ;-):
anyway, i've been investigating and have found a solution.
The Problem:
It seems that screen stores the output of (n)curses applications
incorrectly in the scrollback buffer/window buffer/or whatever
you prefer to call it. It stores the 'enter alternate character
set'/'exit alternate character set' escape sequences used by
(n)curses to draw the line characters incorrectly. The
sequences (for screen) are ^N and ^O (alternate character set use
is enabled by the \E(B\E)0) sequence) in the terminfo database.
And this is what applications use. The scrollback buffer,
however, stores the enter/exit sequences as \E(0 and \E(B. This
is, at least, what is stored in the paste buffer when the
scrollback buffer is copied (^A g SPACE G $ >) and written to a
file (^A : writebuf curses-corruption.output). When moving
between windows the display needs to be updated, and thus the
contents of the scrollback buffer is written to the terminal,
which gets the incorrect enter/exit sequences which, as many
have noticed, totally mess up your display. I assume this is
the problem at least, since sending the escape sequences 'by
hand' (printf '\e(0' or printf '\e(B' at a shell prompt) to the
terminal has the same effect.
The Solution:
Simply remove the 'enacs', 'rmacs', 'smacs' entries from the
screen terminfo definition and recompile it with 'tic'. This,
of course, will only work if your font supports line drawing
characters without a character set switch.
hope this helps,
nikolai
P.S.
To the ratpoison people: A similar question was asked on your list; hope
this answer helps.
D.S.
--
::: name: Nikolai Weibull :: aliases: pcp / lone-star :::
::: born: Chicago, IL USA :: loc atm: Gothenburg, Sweden :::
::: page: www.pcppopper.org :: fun atm: gf,lps,ruby,php,war3 :::
main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);}
- [RP] Re: ncurses issues,
Nikolai :: lone-star :: Weibull <=