navkeys.patch 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. diff -ru ex-050325/ex_tty.c ex-050325-du/ex_tty.c
  2. --- ex-050325/ex_tty.c 2005-03-04 13:42:58.000000000 +0100
  3. +++ ex-050325-du/ex_tty.c 2009-06-25 20:06:57.000000000 +0200
  4. @@ -132,7 +132,8 @@
  5. &ED, &EI, &F0, &F1, &F2, &F3, &F4, &F5, &F6, &F7, &F8, &F9,
  6. &HO, &IC, &IM, &IP, &KD, &KE, &KH, &KL, &KR, &KS, &KU, &LL, &ND, &xNL,
  7. &xPC, &RC, &SC, &SE, &SF, &SO, &SR, &TA, &TE, &TI, &UP, &VB, &VS, &VE,
  8. - &AL_PARM, &DL_PARM, &UP_PARM, &DOWN_PARM, &LEFT_PARM, &RIGHT_PARM
  9. + &AL_PARM, &DL_PARM, &UP_PARM, &DOWN_PARM, &LEFT_PARM, &RIGHT_PARM,
  10. + &kI, &kD, &kh, &at7, &kP, &kN
  11. };
  12. bool *sflags[] = {
  13. &AM, &BS, &DA, &DB, &EO, &HC,
  14. @@ -170,7 +171,12 @@
  15. addmac1(KD, "j", "down", arrows, 1);
  16. addmac1(KL, "h", "left", arrows, 1);
  17. addmac1(KR, "l", "right", arrows, 1);
  18. - addmac1(KH, "H", "home", arrows, 1);
  19. + addmac1(kI, "i", "insert", arrows, 1);
  20. + addmac1(kD, "x", "delete", arrows, 1);
  21. + addmac1(kh, "^", "home", arrows, 1);
  22. + addmac1(at7, "$", "end", arrows, 1);
  23. + addmac1(kP, "", "pgup", arrows, 1);
  24. + addmac1(kN, "", "pgdn", arrows, 1);
  25. /*
  26. * Handle funny termcap capabilities
  27. @@ -341,7 +347,7 @@
  28. *(*fp++) = flag;
  29. namp += 2;
  30. } while (*namp);
  31. - namp = "albcbtcdceclcmcrcsdcdldmdoedeik0k1k2k3k4k5k6k7k8k9hoicimipkdkekhklkrkskullndnlpcrcscsesfsosrtatetiupvbvsveALDLUPDOLERI";
  32. + namp = "albcbtcdceclcmcrcsdcdldmdoedeik0k1k2k3k4k5k6k7k8k9hoicimipkdkekhklkrkskullndnlpcrcscsesfsosrtatetiupvbvsveALDLUPDOLERIkIkDkh@7kPkN";
  33. sp = sstrs;
  34. do {
  35. string = tgetstr(namp, &aoftspace);
  36. diff -ru ex-050325/ex_tty.h ex-050325-du/ex_tty.h
  37. --- ex-050325/ex_tty.h 2004-12-01 19:21:06.000000000 +0100
  38. +++ ex-050325-du/ex_tty.h 2009-06-25 20:06:05.000000000 +0200
  39. @@ -183,6 +183,15 @@
  40. var bool XX; /* Tektronix 4025 insert line */
  41. /* X? is reserved for severely nauseous glitches */
  42. /* If there are enough of these we may need bit masks! */
  43. +/*
  44. + * Insert, Delete, Home, End, PgUp an PgDown keys
  45. + */
  46. +var char *kI;
  47. +var char *kD;
  48. +var char *kh;
  49. +var char *at7;
  50. +var char *kP;
  51. +var char *kN;
  52. /*
  53. * From the tty modes...