Commit 05575871 authored by Jacek Sowiński's avatar Jacek Sowiński

Wait for further input for 'pri' and 'postpone'

This way user can type offsets and priorities at ease without rush.
parent 2057dcae
......@@ -141,6 +141,7 @@ class TodoListWidget(urwid.LineBox):
def keypress(self, p_size, p_key):
urwid.emit_signal(self, 'remove_pending_action')
requires_further_input = ['postpone', 'postpone_s', 'pri']
keymap, keystates = self.keymap
......@@ -158,6 +159,7 @@ class TodoListWidget(urwid.LineBox):
# keystate in case user will hit another key and add an action
# waiting for execution if user won't type anything further.
self.keystate = shortcut
if action not in requires_further_input:
self._add_pending_action(action, p_size)
else:
# Only action is matched. Handle it and reset keystate.
......
Markdown is supported
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