Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Restore cmdline text input when browsing history
Text input to the internal command line is now restored and not lost after browsing the history. It is designed to behave just like a dedicated history item at the end of the history. This matches the behavior of readline in most shells. For example, writing a command without executing it, then moving up to the most recent history item and down again restores the typed command. The pudb special behavior of clearing the command when moving down from the end of the history is also preserved. In that case the text can be restored too by moving up in the history again before typing anything new. This is akin to using Ctrl-C in common shells to clear the current command, but with the ability to restore the input again. Using the clear button which empties the displayed shell history now also clears the command input, since it can be easily restored. This fixes one of my pain points with the internal pudb command line: When writing a lengthy command, accidentally hitting Ctrl-N or Ctrl-P overwrites the input text field with no possibility to get the content back. This is particularly bad after using vim's word completion with Ctrl-N for an extensive amount of time, and then accidentally hitting the same shortcut in pudb instead of tab completion.
- Loading branch information