From f53c95e7a8cbeb6fb523d179ae166a3ace87dbcd Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Fri, 17 Aug 2018 10:57:07 -0400 Subject: vim-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) https://github.com/vim/vim/commit/6c5d1043022520512ee36aa1a29662b60af33c95 --- src/nvim/ex_docmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c index 8d0a8f21a7..076e77be6a 100644 --- a/src/nvim/ex_docmd.c +++ b/src/nvim/ex_docmd.c @@ -2978,7 +2978,7 @@ const char * set_one_cmd_context( // A full match ~user will be replaced by user's home // directory i.e. something like ~user -> /home/user/ if (*p == NUL && p > (const char *)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; } -- cgit