Commit Diff


commit - 27dbcaab4fac08fbb43df9eb5f10781ff7015bb6
commit + 7c1d55bff32b17bf9ac2b1a374c9cfb98935d847
blob - a5f554244e55478d8f19d20432e2b29fce7e19e7
blob + af012cdc506b6e1a1d66a5a8b4595c4de967b1f7
--- minibuffer.c
+++ minibuffer.c
@@ -92,6 +92,7 @@ recompute_completions(int add)
 	char		*input, **ap, *words[10];
 	size_t		 len = 0;
 	struct line	*l;
+	struct vline	*vl;
 	struct buffer	*b;
 
 	if (in_minibuffer != MB_COMPREAD)
@@ -126,6 +127,9 @@ recompute_completions(int add)
 	if (b->current_line == NULL)
 		b->current_line = TAILQ_FIRST(&b->head);
 	b->current_line = adjust_line(b->current_line, b);
+	vl = b->current_line;
+	if (ministate.compl.must_select)
+		vl->parent->type = LINE_COMPL_CURRENT;
 }
 
 int
@@ -480,6 +484,10 @@ populate_compl_buffer(complfn *fn, void *data)
 		linedata = NULL;
 		descr = NULL;
 	}
+
+	if ((l = TAILQ_FIRST(&p->head)) != NULL &&
+	    ministate.compl.must_select)
+		l->type = LINE_COMPL_CURRENT;
 }
 
 void