Skip to content

Scripting Console: When searching history and editing a line, changes are not saved #2468

@CouleeApps

Description

@CouleeApps

In the scripting console, if you press Up to cycle through history, and decide to edit one of the lines, pressing Up/Down again will discard any changes you made and continue searching history from the line you started editing.

I've seen a number of different approaches to selecting history entries and editing them in a console like this, and the most reasonable solution seems to be resolving/cancelling the search and considering the edited text as if you had manually typed it. This means that pressing Up after editing a history line would show the latest history line.

Current behavior: Pressing up/down continues searching through history at the line previously edited, and your changes are not saved at all.
Expected behavior: Pressing up/down starts searching history as if you had manually entered the line, storing its contents as the last item of history, and searching from your most recently entered command.

Repro steps:

  1. Enter some command
  2. Enter a second command
  3. Press Up once to load the second command into the box
  4. Edit the input but do not send it
  5. Press Up
  6. Press Down
  7. Observe edited input is discarded

Metadata

Metadata

Assignees

Labels

Component: UIIssue needs changes to the user interfaceEffort: LowIssues require < 1 week of workImpact: LowIssue is a papercut or has a good, supported workaroundUI: Python ConsoleIssues with the Python Console

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions