Skip to content

Commit

Permalink
scripts/kconfig/nconf: add KEY_HOME / KEY_END for dialog_inputbox
Browse files Browse the repository at this point in the history
to make it easier to locate begin/end when editing long strings;

Signed-off-by: Cheng Renquan <[email protected]>
Acked By: Nir Tzachar <[email protected]>
  • Loading branch information
crquan authored and michal42 committed Sep 9, 2011
1 parent e631a57 commit 93072c3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions scripts/kconfig/nconf.gui.c
Original file line number Diff line number Diff line change
Expand Up @@ -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' */
Expand Down

0 comments on commit 93072c3

Please sign in to comment.