diff options
author | Changbin Du <changbin.du@gmail.com> | 2019-03-25 15:16:47 +0000 |
---|---|---|
committer | Masahiro Yamada <yamada.masahiro@socionext.com> | 2019-03-29 22:48:01 +0900 |
commit | 9c38f1f044080392603c497ecca4d7d09876ff99 (patch) | |
tree | cfccd65421505a7cabf6e3e9f13a1ed64035ecf7 /scripts/kconfig/nconf.c | |
parent | 54a7151b1496cddbb7a83546b7998103e98edc88 (diff) |
kconfig/[mn]conf: handle backspace (^H) key
Backspace is not working on some terminal emulators which do not send the
key code defined by terminfo. Terminals either send '^H' (8) or '^?' (127).
But currently only '^?' is handled. Let's also handle '^H' for those
terminals.
Signed-off-by: Changbin Du <changbin.du@gmail.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'scripts/kconfig/nconf.c')
-rw-r--r-- | scripts/kconfig/nconf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/kconfig/nconf.c b/scripts/kconfig/nconf.c index a4670f4e825a..ac92c0ded6c5 100644 --- a/scripts/kconfig/nconf.c +++ b/scripts/kconfig/nconf.c @@ -1048,7 +1048,7 @@ static int do_match(int key, struct match_state *state, int *ans) state->match_direction = FIND_NEXT_MATCH_UP; *ans = get_mext_match(state->pattern, state->match_direction); - } else if (key == KEY_BACKSPACE || key == 127) { + } else if (key == KEY_BACKSPACE || key == 8 || key == 127) { state->pattern[strlen(state->pattern)-1] = '\0'; adj_match_dir(&state->match_direction); } else |