diff options
-rw-r--r-- | src/ui-day.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/ui-day.c b/src/ui-day.c index 08248e6..0501642 100644 --- a/src/ui-day.c +++ b/src/ui-day.c @@ -78,11 +78,16 @@ static int day_edit_duration(int start, int dur, unsigned *new_duration) unsigned hr, mn; for (;;) { + int ret; + status_mesg(msg_time, ""); - if (updatestring(win[STA].p, ×tr, 0, 1) != - GETSTRING_VALID) + ret = updatestring(win[STA].p, ×tr, 0, 1); + if (ret == GETSTRING_ESC) { return 0; - if (*timestr == '+' + } else if (ret == GETSTRING_RET) { + *new_duration = 0; + break; + } else if (*timestr == '+' && parse_duration(timestr + 1, new_duration) == 1) { *new_duration *= MININSEC; break; |