mirror of the now-defunct rocklinux.org
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.

77 lines
1.9 KiB

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