diff options
author | Lars Henriksen <LarsHenriksen@get2net.dk> | 2019-05-30 09:42:21 +0200 |
---|---|---|
committer | Lukas Fleischer <lfleischer@calcurse.org> | 2019-05-30 07:46:33 -0400 |
commit | e6ff3f417c1e89b6e2530e6afe3802217482d052 (patch) | |
tree | 50a24d1521f159719034447e293220fbfdfcc431 | |
parent | 0edc2e86378fdfe00255be3ac30c56eff359c961 (diff) | |
download | calcurse-e6ff3f417c1e89b6e2530e6afe3802217482d052.tar.gz calcurse-e6ff3f417c1e89b6e2530e6afe3802217482d052.zip |
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>
-rw-r--r-- | src/day.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -120,8 +120,11 @@ int day_get_days(void) /* Assume one event per day (no event separator). */ day = 2 + conf.header_line + conf.day_separator + conf.empty_appt_line; + if (panel <= day) + return 2; + /* Round up. */ - return panel / day + (panel % day != 0); + return panel / day + (panel % day ? 1 : 0); } static void day_free(struct day_item *day) |