From f4f7e04c5bed37d33856a5d7990920895d0bf5d4 Mon Sep 17 00:00:00 2001 From: Chris Allegretta Date: Thu, 4 Jan 2001 16:56:15 +0000 Subject: [PATCH] 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 --- ChangeLog | 2 ++ nano.c | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/ChangeLog b/ChangeLog index 5bed21db..9cbc263a 100644 --- 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 index 0dd17726..80bb951c 100644 --- 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 */ -- 2.39.5