commit f4f7e04c5bed37d33856a5d7990920895d0bf5d4
parent 75ef81bc42aea50f5372a2d173cc281e526af2ce
Author: Chris Allegretta <chrisa@asty.org>
Date: Thu, 4 Jan 2001 16:56:15 +0000
Work around gnome-terminal, I'm tired of this
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@445 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
Diffstat:
2 files changed, 22 insertions(+), 0 deletions(-)
diff --git a/ChangeLog b/ChangeLog
@@ -9,6 +9,8 @@ General -
FINALLY! No more keypad_on(), no more individual calls in
main(), do_help(), do_browser(), etc etc etc. Removed call to
timeout(0) in main() (which caused the whole mess), fixes BUG #49.
+ Added workarounds for gnome-terminal in main() (Alt-O-key and
+ 348-352).
- faq.html:
- Fix typos and small mistakes (Jordi).
- files.c:
diff --git a/nano.c b/nano.c
@@ -2265,6 +2265,8 @@ int main(int argc, char *argv[])
kbinput = wgetch(edit);
if (kbinput <= 'S' && kbinput >= 'P')
kbinput = KEY_F(kbinput - 79);
+ else if (kbinput >= 'j' && kbinput <= 'y')
+ kbinput = kbinput - 64;
#ifdef DEBUG
else {
fprintf(stderr, _("I got Alt-O-%c! (%d)\n"),
@@ -2458,6 +2460,24 @@ int main(int argc, char *argv[])
case 0: /* Erg */
do_next_word();
break;
+
+ /* Stupid gnome-terminal keypad */
+ case 349:
+ ungetch('5');
+ break;
+ case 348:
+ ungetch('7');
+ break;
+ case 350:
+ ungetch('9');
+ break;
+ case 351:
+ ungetch('1');
+ break;
+ case 352:
+ ungetch('3');
+ break;
+
case 331: /* Stuff that we don't want to do squat */
case -1:
case 410: /* Must ignore this, it gets sent when we resize */