summaryrefslogtreecommitdiffstats
path: root/src/ex_docmd.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-07-07 16:41:13 +0200
committerBram Moolenaar <Bram@vim.org>2018-07-07 16:41:13 +0200
commit6c5d1043022520512ee36aa1a29662b60af33c95 (patch)
tree05f2a6867642e98c43a591cb2c264fdaf86fe514 /src/ex_docmd.c
parent1ebff3dc93b6d022ccfe0613c1d1ee2d62fc7935 (diff)
patch 8.1.0159: completion for user names does not work for a prefix.v8.1.0159
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)
Diffstat (limited to 'src/ex_docmd.c')
-rw-r--r--src/ex_docmd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index e198a286af..4b3fdac375 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -3764,7 +3764,7 @@ set_one_cmd_context(
* 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;