Return at least two days in multiple days mode
Signed-off-by: Lars Henriksen <LarsHenriksen@get2net.dk> Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
This commit is contained in:
parent
0edc2e8637
commit
e6ff3f417c
@ -120,8 +120,11 @@ int day_get_days(void)
|
|||||||
/* Assume one event per day (no event separator). */
|
/* Assume one event per day (no event separator). */
|
||||||
day = 2 + conf.header_line + conf.day_separator + conf.empty_appt_line;
|
day = 2 + conf.header_line + conf.day_separator + conf.empty_appt_line;
|
||||||
|
|
||||||
|
if (panel <= day)
|
||||||
|
return 2;
|
||||||
|
|
||||||
/* Round up. */
|
/* Round up. */
|
||||||
return panel / day + (panel % day != 0);
|
return panel / day + (panel % day ? 1 : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void day_free(struct day_item *day)
|
static void day_free(struct day_item *day)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user