1e787e49f28da361e41988e4418d5ae649fc1514 — William Casarin a month ago 968273b master
query_span: don't query hidden calendars
1 files changed, 4 insertions(+), 6 deletions(-)

M viscal.c
M viscal.c => viscal.c +4 -6
@@ 941,6 941,9 @@ for (int i=index_hint; i < cal->nevents; i++) {
  		ev = &cal->events[i];
  
+ 		if (!ev->ical->visible)
+ 			continue;
+ 
  		icaltimetype dtstart =
  			icalcomponent_get_dtstart(ev->vevent);
  


@@ 986,12 989,7 @@ struct event *ev = &cal->events[hit];
  		vevent_span_timet(ev->vevent, &st, &et);
  
- 		if (!ev->ical->visible) {
- 			hit = -1;
- 		}
- 		else {
- 			cal->current = st;
- 		}
+ 		cal->current = st;
  	}
  
  	cal->selected_event_ind = hit;