From e8d6a33c830bf34733450c9d9a9cf792f1136c1a Mon Sep 17 00:00:00 2001 From: "C. Davis" Date: Fri, 17 Aug 2012 02:15:20 -0700 Subject: regedit: Restore cursor position when user tabs to a field. Reviewed-by: Andreas Schneider Reviewed-by: Michael Adam --- source3/utils/regedit_dialog.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source3/utils') diff --git a/source3/utils/regedit_dialog.c b/source3/utils/regedit_dialog.c index 94f1b65e25..6571baaf96 100644 --- a/source3/utils/regedit_dialog.c +++ b/source3/utils/regedit_dialog.c @@ -426,6 +426,7 @@ int dialog_input(TALLOC_CTX *ctx, char **output, const char *title, } else { input_section = true; set_current_field(input, field[0]); + pos_form_cursor(input); } } else if (input_section) { handle_form_input(input, c); @@ -716,6 +717,7 @@ static void section_down(struct edit_dialog *edit) } else { set_current_field(edit->input, edit->field[FLD_DATA]); + pos_form_cursor(edit->input); } } break; @@ -729,6 +731,7 @@ static void section_down(struct edit_dialog *edit) case IN_MENU: edit->section = IN_NAME; set_current_field(edit->input, edit->field[FLD_NAME]); + pos_form_cursor(edit->input); break; } update_panels(); @@ -749,6 +752,7 @@ static void section_up(struct edit_dialog *edit) form_driver(edit->input, REQ_VALIDATION) == E_OK) { edit->section = IN_NAME; set_current_field(edit->input, edit->field[FLD_NAME]); + pos_form_cursor(edit->input); } break; case IN_MENU: @@ -757,6 +761,7 @@ static void section_up(struct edit_dialog *edit) hexedit_set_cursor(edit->buf); } else { set_current_field(edit->input, edit->field[FLD_DATA]); + pos_form_cursor(edit->input); } break; } -- cgit