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