Dash:
[t2-trunk.git] / package / editors / hexedit / 00-hexedit-vi-keys.patch
blob98980bf4b8a290c17a69c64eeb9856c1663bdfab
1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
3 #
4 # T2 SDE: package/.../hexedit/00-hexedit-vi-keys.patch
5 # Copyright (C) 2004 - 2005 The T2 SDE Project
6 # Copyright (C) 1998 - 2003 ROCK Linux Project
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 # --- T2-COPYRIGHT-NOTE-END ---
18 diff -u hexedit/interact.c hexedit-hacked/interact.c
19 --- hexedit/interact.c Wed Jun 19 13:55:40 2002
20 +++ hexedit-hacked/interact.c Wed Oct 9 12:04:18 2002
21 @@ -360,6 +360,39 @@
22 next_line();
23 break;
25 + /* VI keys */
26 + case 'h':
27 + if (!hexOrAscii) {
28 + setTo(key);
29 + break;
30 + }
31 + backward_char();
32 + break;
34 + case 'l':
35 + if (!hexOrAscii) {
36 + setTo(key);
37 + break;
38 + }
39 + forward_char();
40 + break;
42 + case 'k':
43 + if (!hexOrAscii) {
44 + setTo(key);
45 + break;
46 + }
47 + previous_line();
48 + break;
50 + case 'j':
51 + if (!hexOrAscii) {
52 + setTo(key);
53 + break;
54 + }
55 + next_line();
56 + break;
58 case KEY_UP:
59 case CTRL('P'):
60 previous_line();
61 @@ -443,6 +476,14 @@
63 case CTRL('G'):
64 case KEY_F(4):
65 + goto_char();
66 + break;
68 + case 'g':
69 + if (!hexOrAscii) {
70 + setTo(key);
71 + break;
72 + }
73 goto_char();
74 break;