commit 26f52d42eb3efb3f44cd00559ffb9ea6568cb3c2
parent b558d9e8ce57f989f886aa95afcdfb1df39c67f1
Author: William Casarin <jb55@jb55.com>
Date: Fri, 28 Jun 2019 11:48:29 -0700
move_relative: fix wrt. hidden calendars
Diffstat:
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/viscal.c b/viscal.c
@@ -974,7 +974,13 @@ static void move_relative(struct cal *cal, int rel)
if ((hit = query_span(cal, 0, st, et, 0, 0)) != -1) {
struct event *ev = &cal->events[hit];
vevent_span_timet(ev->vevent, &st, &et);
- cal->current = st;
+
+ if (!ev->ical->visible) {
+ hit = -1;
+ }
+ else {
+ cal->current = st;
+ }
}
cal->selected_event_ind = hit;