commit f5031cd5f1e984f6d84f82d4bb29a98fd54ac839
parent a04ce8b56a0a878b2383cf9aac8b7f36182168d5
Author: William Casarin <jb55@jb55.com>
Date:   Sat, 25 Aug 2018 23:14:56 -0700
open: fix issue with creating event after last event
Diffstat:
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/viscal.c b/viscal.c
@@ -658,14 +658,13 @@ static void open_below(struct cal *cal)
 
 		if (ind == -1)
 			break;
-
-		push_down(cal, cal->selected_event_ind, ind, push_to);
-
-		create_event(cal, et, push_to, ev->ical->calendar);
-
-		select_down(cal, 1);
+		else
+			push_down(cal, cal->selected_event_ind, ind, push_to);
 	}
 
+	create_event(cal, et, push_to, ev->ical->calendar);
+
+	select_down(cal, 1);
 
 }