Commit Diff


commit - cb6c7aa0f2181e8fe3b60efd66c440288967c642
commit + e0e26735232e1d664b3ccb49856f754d05015d0c
blob - 2625844595554b41afae0707bdeb684270465a40
blob + ed00b25330e3de1c47f9ca49b0170c532e826edc
--- ui.c
+++ ui.c
@@ -140,7 +140,6 @@ static WINDOW	*tabline, *body, *modeline, *minibuf;
 static int	 body_lines, body_cols;
 
 static struct event	clminibufev;
-static int		clminibufev_set;
 static struct timeval	clminibufev_timer = { 5, 0 };
 static struct timeval	loadingev_timer = { 0, 250000 };
 
@@ -1048,8 +1047,6 @@ done:
 static void
 handle_clear_minibuf(int fd, short ev, void *d)
 {
-	clminibufev_set = 0;
-
 	free(ministate.curmesg);
 	ministate.curmesg = NULL;
 
@@ -1350,11 +1347,10 @@ redraw_body(struct tab *tab)
 static void
 vmessage(const char *fmt, va_list ap)
 {
-	if (clminibufev_set)
+	if (evtimer_pending(&clminibufev, NULL))
 		evtimer_del(&clminibufev);
 	evtimer_set(&clminibufev, handle_clear_minibuf, NULL);
 	evtimer_add(&clminibufev, &clminibufev_timer);
-	clminibufev_set = 1;
 
 	free(ministate.curmesg);