From: Cheng Renquan Date: Thu, 1 Sep 2011 17:52:22 +0000 (-0700) Subject: scripts/kconfig/nconf: add KEY_HOME / KEY_END for dialog_inputbox X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=93072c3ecafcf188390750cc755185f3150736b9;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Acked By: Nir Tzachar --- diff --git a/scripts/kconfig/nconf.gui.c b/scripts/kconfig/nconf.gui.c index 4b9d8b66087d..3b18dd839668 100644 --- a/scripts/kconfig/nconf.gui.c +++ b/scripts/kconfig/nconf.gui.c @@ -465,6 +465,14 @@ int dialog_inputbox(WINDOW *main_window, cursor_form_win--; } 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: if ((isgraph(res) || isspace(res))) { /* one for new char, one for '\0' */