Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Key menu and unwanted scrolling

3 views
Skip to first unread message

Nicholas S.

unread,
Feb 1, 2003, 5:41:45 AM2/1/03
to
Hi.

I have a terminal (an OS/2 VIO window -- supposedly ANSI-compatible)
that scrolls when a character is written to the bottom-right corner.
Hence the screen scrolls whenever the key menu is re-drawn if I have
colour turned on.

The help for key label colours suggests setting the key label colour to
"default" to avoid this but this doesn't work for me. If I go to pinerc
and add garbage values for keylabel-*-color, the screen no longer
scrolls when the key menu is re-drawn but it still sometimes scrolls
when the main screen area is re-drawn (because Pine is writing spaces
down to the last row, I assume; I haven't looked carefully at this).

Does anyone know of a better work-around?

Nicholas S.
--
|\ Location: Wollongong, Australia | Whenever you hear a man speak of his
|\ E-mail: n...@zeta.org.au | love for his country, it is a sure sign
| WWW: http://www.zeta.org.au/~nps | he expects to be paid for it.
| ---> Cynicism & Negativity |
- Henry Mencken

Eduardo Chappa

unread,
Feb 1, 2003, 11:25:03 PM2/1/03
to
*** Nicholas S. (n...@zeta.org.au) wrote in comp.mail.pine today:

:) I have a terminal (an OS/2 VIO window -- supposedly ANSI-compatible)
:) that scrolls when a character is written to the bottom-right corner.
:) Hence the screen scrolls whenever the key menu is re-drawn if I have
:) colour turned on.

I had the same problem in the cygwin terminal. The way I solved this
problem was by patching Pine. I have a patch in my web page for cygwin,
which you may want to take a look. Take a look at the hunk that patches
the file screen.c

Hopefully a similar hunk in your situation may solve your problem. By the
way, what is the value of

echo $TERM

?

--
Eduardo
http://www.math.washington.edu/~chappa/pine/

Nicholas S.

unread,
Feb 2, 2003, 6:51:01 AM2/2/03
to
On Sun, 2 Feb 2003 04:25:03 UTC, Eduardo Chappa <cha...@math.washington.edu> wrote:

>
> I had the same problem in the cygwin terminal. The way I solved this
> problem was by patching Pine. I have a patch in my web page for cygwin,
> which you may want to take a look. Take a look at the hunk that patches
> the file screen.c

This fixes the problem caused by the key meny output, but I still get
some incorrect scrolling when the main screen area is re-drawn. I.e. it
is the same result as I get if I set keylabel-*-color to garbage values.



> Hopefully a similar hunk in your situation may solve your problem. By the
> way, what is the value of
>
> echo $TERM

I normally use `os2', which is a TERMINFO file I took from one of
ncurses or Lynx, I don't remember. I've also tried various incarnations
of TERM=ansi to same effect. OS/2 windows are supposedly ANSI and I
think most OS/2 users use TERM=ansi.

Nicholas S.


--
|\ Location: Wollongong, Australia | For every problem faced by the human
|\ E-mail: n...@zeta.org.au | race there is a solution which is simple,
| WWW: http://www.zeta.org.au/~nps | plausible and wrong.

Eduardo Chappa

unread,
Feb 2, 2003, 12:27:16 PM2/2/03
to
*** Nicholas S. (n...@zeta.org.au) wrote in comp.mail.pine today:

:) On Sun, 2 Feb 2003 04:25:03 UTC, Eduardo Chappa
:) <cha...@math.washington.edu> wrote:
:)
:) > I had the same problem in the cygwin terminal. The way I solved this
:) > problem was by patching Pine. I have a patch in my web page for
:) > cygwin, which you may want to take a look. Take a look at the hunk
:) > that patches the file screen.c
:)
:) This fixes the problem caused by the key meny output, but I still get
:) some incorrect scrolling when the main screen area is re-drawn. I.e. it
:) is the same result as I get if I set keylabel-*-color to garbage
:) values.

Ok, that means that your terminal is more broken that the cygwin one. Let
me tell you how I figured out where the problem was, it may be a guideline
for you to follow (since I do not have access to your system).

- First figure out a sequence of keys that always reproduces the
problem. Add to that sequence of keystrokes the sequence of keystrokes
necessary to quit Pine.

- Run the command "pine > output_file". You won't see any output, but
press the keystrokes that you recorded in the previous step, including
those necessary to quit Pine. (there are more elegant ways to do
this).

- The above command should have produced a file called "output_file".
Now "cat" that file. You should seethe problem reproduced in the
screen. If you don't (say the screen was cleared at the end of the
execution), you will need to edit the file to erase the part of that
file that erases the screen.

- Make a backup of that file and edit the file. The idea of editing the
file is trying to remove information from the file so that when
catting it, you won't see the problem. If you removed something that
did not fix the problem, start from your backup file again, and delete
stuff until you figure out what to erase to fix the problem.

This last step may take a while.

By the way, what's the sequence of keystrokes that reproduces the
problem?. Oh have you tried compiling using termcap or curses or ncurses
instead of using terminfo. Finally, what's the code "xyz" that you use to
compile pine (the "xyz part in "./build xyz").

--
Eduardo
http://www.math.washington.edu/~chappa/pine/

Nicholas S.

unread,
Feb 3, 2003, 5:08:19 AM2/3/03
to
On Sun, 2 Feb 2003 17:27:16 UTC, Eduardo Chappa <cha...@math.washington.edu> wrote:

> Ok, that means that your terminal is more broken that the cygwin one.

After some experimentation, in fact I think it is the terminfo database
entry that is wrong. It doesn't have back-colour-erase (bce) set so Pine
is clearing the screen by writing spaces in CleartoEOLN() etc. If I
hard-code _bce to 1 in ./pico/osdep/term.inf then (combined with the
cygwin patches) everything works okay. I'll have to hunt around for the
terminfo entry source and re-compile it.

Alternatively, this patch fixes it for me when combined with the cygwin
patches and without hard-coding _bce:

*** r1\pine\osdep\termout.unx Fri Feb 15 11:02:14 2002
--- n2\pine\osdep\termout.unx Mon Feb 3 20:31:50 2003
***************
*** 896,901 ****
last_bg_color = pico_get_last_bg_color();
pico_set_nbg_color();
! for(c = _col; c < _columns; c++)
! Writechar(' ', 0);

MoveCursor(starting_line, starting_col);
--- 897,907 ----
last_bg_color = pico_get_last_bg_color();
pico_set_nbg_color();
! if (_line < ps_global->ttyo->screen_rows - 1) {
! for(c = _col; c < _columns; c++)
! Writechar(' ', 0);
! } else {
! for(c = _col; c < (_columns - 1); c++)
! Writechar(' ', 0);
! }

MoveCursor(starting_line, starting_col);


> By the way, what's the sequence of keystrokes that reproduces the
> problem?.

It happens the first time it draws the main menu (no keys pressed). Some
other screen re-drawing when reading mail also causes problems but I
never bothered to figure out how to do it reliably.

> Oh have you tried compiling using termcap or curses or ncurses
> instead of using terminfo.

It is linked with ncurses. There are no fully functional OS/2 terminal
entries for termcap, so far as I know.

> Finally, what's the code "xyz" that you use to
> compile pine (the "xyz part in "./build xyz").

There is a unique build script for OS/2. The version I am writing about
is built from a new set of patches that aren't in the Uni of Washington
distribution.


Nicholas S.

--
|\ Location: Wollongong, Australia | Sex without love is an empty experience,
|\ E-mail: n...@zeta.org.au | but, as empty experiences go, it's one of
| WWW: http://www.zeta.org.au/~nps | the best.
| ---> Cynicism & Negativity |
- Woody Allen

Thomas Dickey

unread,
Feb 3, 2003, 5:53:25 AM2/3/03
to
Nicholas S. <n...@zeta.org.au> wrote:

>> Hopefully a similar hunk in your situation may solve your problem. By the
>> way, what is the value of
>>
>> echo $TERM

> I normally use `os2', which is a TERMINFO file I took from one of
> ncurses or Lynx, I don't remember. I've also tried various incarnations

not from anything I've done - perhaps someone's package. ncurses defines
ansi-emx (install from emx.src as "ansi"), which is may be the original of that. OS/2 console windows differ
from EMX's slightly.

> of TERM=ansi to same effect. OS/2 windows are supposedly ANSI and I

supposedly. "ANSI" is overworked...

> think most OS/2 users use TERM=ansi.

EMX's "ansi" differs from others though - among those is the bce value,
which is set in ansi-emx, but not in the normal (actually SCO) "ansi".

--
Thomas E. Dickey <dic...@radix.net> <dic...@herndon4.his.com>
http://dickey.his.com
ftp://dickey.his.com

Eduardo Chappa

unread,
Feb 3, 2003, 10:45:55 AM2/3/03
to
*** Nicholas S. (n...@zeta.org.au) wrote in comp.mail.pine today:

:) On Sun, 2 Feb 2003 17:27:16 UTC, Eduardo Chappa
:) <cha...@math.washington.edu> wrote:
:)
:) > Ok, that means that your terminal is more broken that the cygwin one.
:)
:) After some experimentation, in fact I think it is the terminfo database
:) entry that is wrong. It doesn't have back-colour-erase (bce) set so Pine
:) is clearing the screen by writing spaces in CleartoEOLN() etc. If I
:) hard-code _bce to 1 in ./pico/osdep/term.inf then (combined with the
:) cygwin patches) everything works okay. I'll have to hunt around for the
:) terminfo entry source and re-compile it.

It seems that your terminal is scrolling as soon as a character is written
in the last column. Pine fills with white space up to the end of the line,
which is not nice not only because of the problem that is causing you, but
for terminals that don't scroll, all those spaces appear when you cut and
paste text from the screen. I wish that those spaces did not appear. (at
least for messages sent by Pine, spaces at the end of the line are
removed, which is an inconvenience for some people, but still does not fix
the whole problem of cutting and pasting from a terminal working with
colors).

--
Eduardo
http://www.math.washington.edu/~chappa/pine/

Nicholas S.

unread,
Feb 4, 2003, 5:37:50 AM2/4/03
to
On Mon, 3 Feb 2003 10:53:25 UTC, Thomas Dickey <dic...@saltmine.radix.net> wrote:

> not from anything I've done - perhaps someone's package.

I guess `os2' came from Lynx, then.


> EMX's "ansi" differs from others though - among those is the bce value,
> which is set in ansi-emx, but not in the normal (actually SCO) "ansi".

I compiled ansi-color-2-emx from terminfo.src and that seems to be
working great now.

Thanks also to Eduardo, I've got it working well now.

Nicholas S.

--
|\ Location: Wollongong, Australia | Capitalism is a system in which man
|\ E-mail: n...@zeta.org.au | exploits man. In socialism, it is the
| WWW: http://www.zeta.org.au/~nps | other way around.
| ---> Cynicism & Negativity |
- East German saying from the Soviet era

0 new messages