Re: more on Home/End not working at statusbarw/ALT_KEYPAD on xterm
Chris Allegretta <chrisa <at> asty.org>
2003-07-03 02:52:05 GMT
On Wed, Jul 02, 2003 at 02:57:51PM -0700, David Lawrence Ramsey wrote:
> Jordi Mallach:
> >It works for me, using the Debian package:
> >^W, scribble something and home end works ok.
> >Xterm, ncurses version: 5.3.20030510-2
> >Applying your patch makes it not work, unfortunately...
> Looking at the documentation added by the -2 diff pointed me in the
> right direction:
> The problem here appears to be that nano should be in cursor application
> mode (via keypad(window, TRUE)) while the statusbar prompt is being
> used, but isn't when in ALT_KEYPAD mode, and hence generates the wrong
> key sequences for Home and End.
> With current CVS, ncurses 5.3, and nano with -K, if I manually check
> "Enable application cursor keys", it fixes the problem in bottomwin but
> breaks it in other places.
> Using these results, I've recreated the patch. Now it forces cursor
> application mode on in the bottomwin window in nanogetstr() and turns it
> off after reading the input, which appears to fix the problem, at least
> in my preliminary testing.
> However, I don't know whether this is due to a bug in ncurses 5.3 that's
> been fixed in 5.3.20030510-2 or not. I've read the NEWS file for
> ncurses-20030510, and the only explicit mention of a keypad() bug is
> between ncurses 5.2 and 5.3.
> In any case, does the new patch still break nano for you? All other
> input routines besides the edit window input routines force cursor
> application mode on for at least some windows (the file browser: edit;
> the help browser: edit and bottomwin), so I'm wondering whether what the
> patch adds is correct behavior or not.
I wonder if this would not allow FreeBSD users to use their backspace
keys properly. Currently that's one large reason to use -K, that
keypad() seems to change the backspace key into delete. I don't have a
FreeBSD system to test this on anymore though...
Chris Allegretta http://www.asty.org
"Share and Enjoy" - Douglas Adams, 1952 - 2001