OpenSDE Packages Database (without history before r20070)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

75 lines
1.7 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../hexedit/00-hexedit-vi-keys.patch
  5. # Copyright (C) 2004 - 2006 The T2 SDE Project
  6. # Copyright (C) 1998 - 2003 Clifford Wolf
  7. #
  8. # More information can be found in the files COPYING and README.
  9. #
  10. # This patch file is dual-licensed. It is available under the license the
  11. # patched project is licensed under, as long as it is an OpenSource license
  12. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  13. # of the GNU General Public License as published by the Free Software
  14. # Foundation; either version 2 of the License, or (at your option) any later
  15. # version.
  16. # --- SDE-COPYRIGHT-NOTE-END ---
  17. diff -u hexedit/interact.c hexedit-hacked/interact.c
  18. --- hexedit/interact.c Wed Jun 19 13:55:40 2002
  19. +++ hexedit-hacked/interact.c Wed Oct 9 12:04:18 2002
  20. @@ -360,6 +360,39 @@
  21. next_line();
  22. break;
  23. + /* VI keys */
  24. + case 'h':
  25. + if (!hexOrAscii) {
  26. + setTo(key);
  27. + break;
  28. + }
  29. + backward_char();
  30. + break;
  31. +
  32. + case 'l':
  33. + if (!hexOrAscii) {
  34. + setTo(key);
  35. + break;
  36. + }
  37. + forward_char();
  38. + break;
  39. +
  40. + case 'k':
  41. + if (!hexOrAscii) {
  42. + setTo(key);
  43. + break;
  44. + }
  45. + previous_line();
  46. + break;
  47. +
  48. + case 'j':
  49. + if (!hexOrAscii) {
  50. + setTo(key);
  51. + break;
  52. + }
  53. + next_line();
  54. + break;
  55. +
  56. case KEY_UP:
  57. case CTRL('P'):
  58. previous_line();
  59. @@ -443,6 +476,14 @@
  60. case CTRL('G'):
  61. case KEY_F(4):
  62. + goto_char();
  63. + break;
  64. +
  65. + case 'g':
  66. + if (!hexOrAscii) {
  67. + setTo(key);
  68. + break;
  69. + }
  70. goto_char();
  71. break;