Commit Diff


commit - 3f0b6911f04edeb3b3db82635d5403e519cd365e
commit + 47eb6cd728d9e56a97c0aeac9791e7e0eb4ad3eb
blob - 918e3d36d5fd8c5d989c05f78105549e773a4fea
blob + 5569fbc64b99d62b67fbc431d37ab7ba3e15f148
--- cmd.c
+++ cmd.c
@@ -785,7 +785,7 @@ cmd_mini_complete_and_exit(struct buffer *buffer)
 	if (!in_minibuffer)
 		return;
 
-	if (ministate.compl.must_select) {
+	if (ministate.compl.must_select && ministate.hist_cur == NULL) {
 		vl = ministate.compl.buffer.current_line;
 		if (vl == NULL || vl->parent->flags & L_HIDDEN ||
 		    vl->parent->type == LINE_COMPL) {