ABCD(), main() - Add Alt-whatever-[a-d] support as well as Alt-whatever-[A-D].
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@615 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
Этот коммит содержится в:
родитель
18d70f1478
Коммит
316e4d9a67
@ -31,6 +31,8 @@ Cvs code -
|
|||||||
- nano.c:
|
- nano.c:
|
||||||
do_alt_speller()
|
do_alt_speller()
|
||||||
- Reposition cursor on same line as before ^T was called (Rocco)
|
- Reposition cursor on same line as before ^T was called (Rocco)
|
||||||
|
ABCD(), main()
|
||||||
|
- Add Alt-whatever-[a-d] support as well as Alt-whatever-[A-D].
|
||||||
main()
|
main()
|
||||||
- Code to silently process "-g" and "-j" (Rocco)
|
- Code to silently process "-g" and "-j" (Rocco)
|
||||||
- nano.h:
|
- nano.h:
|
||||||
|
11
nano.c
11
nano.c
@ -2178,12 +2178,16 @@ int ABCD(int input)
|
|||||||
{
|
{
|
||||||
switch (input) {
|
switch (input) {
|
||||||
case 'A':
|
case 'A':
|
||||||
|
case 'a':
|
||||||
return (KEY_UP);
|
return (KEY_UP);
|
||||||
case 'B':
|
case 'B':
|
||||||
|
case 'b':
|
||||||
return (KEY_DOWN);
|
return (KEY_DOWN);
|
||||||
case 'C':
|
case 'C':
|
||||||
|
case 'c':
|
||||||
return (KEY_RIGHT);
|
return (KEY_RIGHT);
|
||||||
case 'D':
|
case 'D':
|
||||||
|
case 'd':
|
||||||
return (KEY_LEFT);
|
return (KEY_LEFT);
|
||||||
default:
|
default:
|
||||||
return 0;
|
return 0;
|
||||||
@ -2454,7 +2458,8 @@ int main(int argc, char *argv[])
|
|||||||
/* Alt-O, suddenly very important ;) */
|
/* Alt-O, suddenly very important ;) */
|
||||||
case 79:
|
case 79:
|
||||||
kbinput = wgetch(edit);
|
kbinput = wgetch(edit);
|
||||||
if (kbinput <= 'D' && kbinput >= 'A')
|
if ((kbinput <= 'D' && kbinput >= 'A') ||
|
||||||
|
(kbinput <= 'd' && kbinput >= 'a'))
|
||||||
kbinput = ABCD(kbinput);
|
kbinput = ABCD(kbinput);
|
||||||
else if (kbinput <= 'z' && kbinput >= 'j')
|
else if (kbinput <= 'z' && kbinput >= 'j')
|
||||||
print_numlock_warning();
|
print_numlock_warning();
|
||||||
@ -2554,6 +2559,10 @@ int main(int argc, char *argv[])
|
|||||||
case 'B':
|
case 'B':
|
||||||
case 'C':
|
case 'C':
|
||||||
case 'D':
|
case 'D':
|
||||||
|
case 'a':
|
||||||
|
case 'b':
|
||||||
|
case 'c':
|
||||||
|
case 'd':
|
||||||
kbinput = ABCD(kbinput);
|
kbinput = ABCD(kbinput);
|
||||||
break;
|
break;
|
||||||
case 'H':
|
case 'H':
|
||||||
|
Загрузка…
Ссылка в новой задаче
Block a user