scripts/kconfig/nconf: add KEY_HOME / KEY_END for dialog_inputbox
to make it easier to locate begin/end when editing long strings; Signed-off-by: Cheng Renquan <crquan@gmail.com> Acked By: Nir Tzachar <nir.tzachar@gmail.com>
This commit is contained in:
committed by
Michal Marek
parent
e631a57a19
commit
93072c3eca
@@ -465,6 +465,14 @@ int dialog_inputbox(WINDOW *main_window,
|
|||||||
cursor_form_win--;
|
cursor_form_win--;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case KEY_HOME:
|
||||||
|
cursor_position = 0;
|
||||||
|
cursor_form_win = 0;
|
||||||
|
break;
|
||||||
|
case KEY_END:
|
||||||
|
cursor_position = len;
|
||||||
|
cursor_form_win = min(cursor_position, prompt_width-1);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
if ((isgraph(res) || isspace(res))) {
|
if ((isgraph(res) || isspace(res))) {
|
||||||
/* one for new char, one for '\0' */
|
/* one for new char, one for '\0' */
|
||||||
|
Reference in New Issue
Block a user