Use empty end date instead of 0 when editing repetitions

Since commit 987fa9d (Allow to omit end date in repetitions,
2019-06-03), one can provide an empty date instead of using the value 0
to omit the end date of a repetition. Use this as default value when
editing repetitions without an end date.

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
This commit is contained in:
Lukas Fleischer
2019-06-06 20:42:10 -04:00
parent 16b346a1f4
commit d659a8e2ee
2 changed files with 12 additions and 17 deletions

View File

@@ -364,7 +364,10 @@ static void update_rept(struct rpt **rpt, const long start)
for (;;) {
mem_free(timstr);
timstr = date_sec2date_str((*rpt)->until, DATEFMT(conf.input_datefmt));
if ((*rpt)->until)
timstr = date_sec2date_str((*rpt)->until, DATEFMT(conf.input_datefmt));
else
timstr = mem_strdup("");
status_mesg(msg_until_1, "");
if (updatestring(win[STA].p, &timstr, 0, 1) == GETSTRING_ESC)
goto cleanup;