patch 8.2.1673: complete_info() selected index has an invalid value
Problem: complete_info() selected index has an invalid value. (Ben Jackson)
Solution: Set the index when there is only one match. (closes #6945)
Add test for complete_info().
diff --git a/src/insexpand.c b/src/insexpand.c
index 03dddc3..23ab0af 100644
--- a/src/insexpand.c
+++ b/src/insexpand.c
@@ -4009,6 +4009,7 @@
{
edit_submode_extra = (char_u *)_("The only match");
edit_submode_highl = HLF_COUNT;
+ compl_curr_match->cp_number = 0;
}
else
{