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-d3aeb78583b8master
parent
75ef81bc42
commit
f4f7e04c5b
|
@ -9,6 +9,8 @@ General -
|
||||||
FINALLY! No more keypad_on(), no more individual calls in
|
FINALLY! No more keypad_on(), no more individual calls in
|
||||||
main(), do_help(), do_browser(), etc etc etc. Removed call to
|
main(), do_help(), do_browser(), etc etc etc. Removed call to
|
||||||
timeout(0) in main() (which caused the whole mess), fixes BUG #49.
|
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:
|
- faq.html:
|
||||||
- Fix typos and small mistakes (Jordi).
|
- Fix typos and small mistakes (Jordi).
|
||||||
- files.c:
|
- files.c:
|
||||||
|
|
20
nano.c
20
nano.c
|
@ -2265,6 +2265,8 @@ int main(int argc, char *argv[])
|
||||||
kbinput = wgetch(edit);
|
kbinput = wgetch(edit);
|
||||||
if (kbinput <= 'S' && kbinput >= 'P')
|
if (kbinput <= 'S' && kbinput >= 'P')
|
||||||
kbinput = KEY_F(kbinput - 79);
|
kbinput = KEY_F(kbinput - 79);
|
||||||
|
else if (kbinput >= 'j' && kbinput <= 'y')
|
||||||
|
kbinput = kbinput - 64;
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
else {
|
else {
|
||||||
fprintf(stderr, _("I got Alt-O-%c! (%d)\n"),
|
fprintf(stderr, _("I got Alt-O-%c! (%d)\n"),
|
||||||
|
@ -2458,6 +2460,24 @@ int main(int argc, char *argv[])
|
||||||
case 0: /* Erg */
|
case 0: /* Erg */
|
||||||
do_next_word();
|
do_next_word();
|
||||||
break;
|
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 331: /* Stuff that we don't want to do squat */
|
||||||
case -1:
|
case -1:
|
||||||
case 410: /* Must ignore this, it gets sent when we resize */
|
case 410: /* Must ignore this, it gets sent when we resize */
|
||||||
|
|
Loading…
Reference in New Issue