summaryrefslogtreecommitdiff
path: root/alot/ui.py
diff options
context:
space:
mode:
Diffstat (limited to 'alot/ui.py')
-rw-r--r--alot/ui.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/alot/ui.py b/alot/ui.py
index 55f0c28d..726a857b 100644
--- a/alot/ui.py
+++ b/alot/ui.py
@@ -37,6 +37,8 @@ class UI(object):
"""history of the command line prompt"""
input_queue = []
"""stores partial keyboard input"""
+ last_commandline = None
+ """saves the last executed commandline"""
def __init__(self, dbman, initialcmd):
"""
@@ -182,6 +184,11 @@ class UI(object):
cmd = CommandSequenceCommand(cmdlist)
self.apply_command(cmd)
+ # store cmdline for use with 'repeat' command
+ cmdline = cmdline.lstrip()
+ if not cmdline.startswith('prompt') and not cmdline.startswith('repeat'):
+ self.last_commandline = cmdline
+
def _unhandeled_input(self, key):
"""
Called by :class:`urwid.MainLoop` if a keypress was passed to the root