diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/ui-todo.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/ui-todo.c b/src/ui-todo.c index 6b20621..8834e39 100644 --- a/src/ui-todo.c +++ b/src/ui-todo.c @@ -67,9 +67,11 @@ void ui_todo_add(void) GETSTRING_VALID) { do { status_mesg(mesg_id, ""); - if ((ch = keys_wgetch(win[KEY].p)) == RETURN) { + ch = keys_wgetch(win[KEY].p); + if (ch == RETURN) ch = '0'; - } + else if (ch == ESCAPE) + return; } while (!isdigit(ch)); struct todo *todo = todo_add(todo_input, ch - '0', 0, NULL); ui_todo_load_items(); |