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>
This commit is contained in:

committed by
Masahiro Yamada

parent
54a7151b14
commit
9c38f1f044
@@ -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
|
||||
|
Reference in New Issue
Block a user