- add vi keybindings to search

- allow for ctrl-h as well

discussion with and ok oga@
This commit is contained in:
okan
2008-04-15 18:33:13 +00:00
parent fe80d40063
commit 4bbb472a25
2 changed files with 26 additions and 5 deletions

19
input.c
View File

@@ -70,6 +70,10 @@ input_keycodetrans(KeyCode kc, u_int state,
case XK_U:
*ctl = CTL_WIPE;
break;
case XK_h:
case XK_H:
*ctl = CTL_ERASEONE;
break;
case XK_a:
case XK_A:
*ctl = CTL_ALL;
@@ -77,6 +81,21 @@ input_keycodetrans(KeyCode kc, u_int state,
}
}
if (*ctl == CTL_NONE && (state & Mod1Mask)) {
switch (ks) {
case XK_j:
case XK_J:
/* Vi "down" */
*ctl = CTL_DOWN;
break;
case XK_k:
case XK_K:
/* Vi "up" */
*ctl = CTL_UP;
break;
}
}
if (*ctl != CTL_NONE)
return (0);