patch 8.1.0159: completion for user names does not work for a prefix.
Problem: Completion for user names does not work if a prefix is also a full
matching name. (Nazri Ramliy)
Solution: Accept both full and partial matches. (Dominique Pelle)
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index e198a28..4b3fdac 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -3764,7 +3764,7 @@
* A full match ~user<Tab> will be replaced by user's home
* directory i.e. something like ~user<Tab> -> /home/user/ */
if (*p == NUL && p > xp->xp_pattern + 1
- && match_user(xp->xp_pattern + 1) == 1)
+ && match_user(xp->xp_pattern + 1) >= 1)
{
xp->xp_context = EXPAND_USER;
++xp->xp_pattern;