diff options
author | 2015-01-27 13:29:12 +0200 | |
---|---|---|
committer | 2015-01-27 13:29:12 +0200 | |
commit | 68be0868c642b7c96fe247b22af933a58371f781 (patch) | |
tree | ada8c599a12c8b31010963e11e0ae168060aee33 | |
parent | f39db2b36bdc2660f8d15c7ce166615a86d2a8c4 (diff) | |
download | nnn-68be0868c642b7c96fe247b22af933a58371f781.tar.gz |
Also treat ^H as backspace
-rw-r--r-- | config.def.h | 1 | ||||
-rw-r--r-- | noice.c | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/config.def.h b/config.def.h index 4c7ade3..996436f 100644 --- a/config.def.h +++ b/config.def.h @@ -18,6 +18,7 @@ struct key bindings[] = { { KEY_BACKSPACE, SEL_BACK }, { KEY_LEFT, SEL_BACK }, { 'h', SEL_BACK }, + { CONTROL('H'), SEL_BACK }, /* Inside */ { KEY_ENTER, SEL_GOIN }, { '\r', SEL_GOIN }, @@ -327,7 +327,7 @@ readln(void) while ((c = getch()) != ERR) { if (c == KEY_ENTER || c == '\r') break; - if (c == KEY_BACKSPACE) { + if (c == KEY_BACKSPACE || c == CONTROL('H')) { getyx(stdscr, y, x); if (x >= x0) { i--; @@ -386,7 +386,7 @@ readmore(char **str) ret = 1; goto out; } - if (c == KEY_BACKSPACE) { + if (c == KEY_BACKSPACE || c == CONTROL('H')) { i--; if (i > 0) { ln = xrealloc(ln, (i + 1) * sizeof(*ln)); |