summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--opplysning.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/opplysning.c b/opplysning.c
index cfc0009..0f8b338 100644
--- a/opplysning.c
+++ b/opplysning.c
@@ -224,6 +224,8 @@ draw_events(int x, int y, size_t numevents,
for (size_t i = 0; i < numevents; ++i) {
const struct event *e = &events[i];
if (year != e->year || month != e->month || day != e->day) {
+ if (SCREEN_H - 2 * R.font_h.baseSize < y)
+ break;
year = e->year;
month = e->month;
day = e->day;