aboutsummaryrefslogtreecommitdiffstats
path: root/noice.c
diff options
context:
space:
mode:
authorsin <sin@2f30.org>2014-10-09 15:54:07 +0100
committersin <sin@2f30.org>2014-10-09 15:54:40 +0100
commitdc711f2fadde0b74934f7679b48938fcc1cf319c (patch)
tree748ad5cf821bee11a71fda21949bfda5c6a67682 /noice.c
parentac2a7e2788517aeddcdbe3bc05198e6073de94db (diff)
downloadnoice-dc711f2fadde0b74934f7679b48938fcc1cf319c.tar.gz
Add emacs-like keybinds for next/prev entry selection
Diffstat (limited to 'noice.c')
-rw-r--r--noice.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/noice.c b/noice.c
index a1d488f..b61ea0d 100644
--- a/noice.c
+++ b/noice.c
@@ -34,6 +34,7 @@
#define LEN(x) (sizeof(x) / sizeof(*(x)))
#define MIN(x, y) ((x) < (y) ? (x) : (y))
#define ISODD(x) ((x) & 1)
+#define CONTROL(c) ((c) ^ 0x40)
struct assoc {
char *regex; /* Regex to match on filename */
@@ -182,12 +183,14 @@ nextsel(int *cur, int max)
/* next */
case 'j':
case KEY_DOWN:
+ case CONTROL('N'):
if (*cur < max - 1)
(*cur)++;
break;
/* prev */
case 'k':
case KEY_UP:
+ case CONTROL('P'):
if (*cur > 0)
(*cur)--;
break;
Un proyecto texto-plano.xyz