Skip to content
Commit e39ff402 authored by raphTec's avatar raphTec Committed by Andreas Klöckner
Browse files

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.
parent f9ca705b
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment