Ticket #3494 (closed task: fixed)

Opened 7 years ago

Last modified 6 years ago

Use INPUT_LAST_TEXT for input_dialog() instead of static vars

Reported by: mooffie Owned by:
Priority: trivial Milestone: 4.8.15
Component: mcedit Version: master
Keywords: Cc:
Blocked By: Blocking:
Branch state: no branch Votes for changeset: committed-master


input_dialog() already supports showing the last input, by using INPUT_LAST_TEXT, so there's no reason to re-implement this feature.

(1) This patch fixes this for the "Run sort" dialog.

(2) It also fixes this for the two "Goto line" dialogs. But for these two we assume the user won't want to see the previous input when he first uses the dialog in the current session (because the line number of yesterday isn't very important today) so we use a static variable to detect "first run".

(3) The diff's "Goto line" command was invoked "incorrectly" by dview_goto_cmd (dview, TRUE) instead of dview_goto_cmd (dview, DIFF_RIGHT).

Change History

comment:1 Changed 7 years ago by mooffie

I see that I forgot to fix the "Mail" dialog. (I missed it because it was using the QUICK_LABELED_INPUT macro whereas previously I scanned only for calls to input_dialog().) I'll add it to the patch soon.

comment:2 Changed 7 years ago by mooffie

(The updated patch fixes the "Mail" dialog.)

comment:3 Changed 7 years ago by andrew_b

  • Blocked By 3420 added

comment:4 Changed 6 years ago by andrew_b

  • Status changed from new to closed
  • Resolution set to fixed
  • Milestone changed from Future Releases to 4.8.15

comment:5 Changed 6 years ago by andrew_b

  • Votes for changeset set to committed-master

comment:6 Changed 6 years ago by andrew_b

  • Blocked By 3420 removed
Note: See TracTickets for help on using tickets.