mirror of
git://git.sv.gnu.org/nano.git
synced 2024-12-24 19:36:52 +03:00
Oops, make that Alt-[-7.8
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@719 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
parent
052f9d238e
commit
b26ecb597e
@ -115,7 +115,7 @@ Cvs code -
|
||||
- Add Alt-whatever-[a-d] support as well as Alt-whatever-[A-D].
|
||||
main()
|
||||
- Code to silently process "-g" and "-j" (Rocco)
|
||||
- Added Alt-[-[-7,8 support for home/end keys (Jeff Teunissen).
|
||||
- Added Alt-[-7,8 support for home/end keys (Jeff Teunissen).
|
||||
signal_init()
|
||||
- Reorder sigaction calls, use sigfillset() to stop SIGTSTP and
|
||||
SIGCONT from being interrupted, allows suspending nano
|
||||
|
29
nano.c
29
nano.c
@ -2611,29 +2611,18 @@ int main(int argc, char *argv[])
|
||||
kbinput = KEY_NPAGE;
|
||||
wgetch(edit);
|
||||
break;
|
||||
case '7':
|
||||
kbinput = KEY_HOME;
|
||||
wgetch(edit);
|
||||
break;
|
||||
case '8':
|
||||
kbinput = KEY_END;
|
||||
wgetch(edit);
|
||||
break;
|
||||
case '[': /* Alt-[-[-[A-E], F1-F5 in linux console */
|
||||
kbinput = wgetch(edit);
|
||||
switch(kbinput) {
|
||||
case 'A':
|
||||
case 'B':
|
||||
case 'C':
|
||||
case 'D':
|
||||
case 'E':
|
||||
if (kbinput >= 'A' && kbinput <= 'E')
|
||||
kbinput = KEY_F(kbinput - 64);
|
||||
break;
|
||||
case 7:
|
||||
kbinput = KEY_HOME;
|
||||
break;
|
||||
case 8:
|
||||
kbinput = KEY_END;
|
||||
break;
|
||||
#ifdef DEBUG
|
||||
default:
|
||||
fprintf(stderr, _("I got Alt-[-[-%c! (%d)\n"),
|
||||
kbinput, kbinput);
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
case 'A':
|
||||
case 'B':
|
||||
|
Loading…
Reference in New Issue
Block a user