Mercurial > vim
changeset 14286:95030c543411 v8.1.0159
patch 8.1.0159: completion for user names does not work for a prefix.
commit https://github.com/vim/vim/commit/6c5d1043022520512ee36aa1a29662b60af33c95
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Jul 7 16:41:13 2018 +0200
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)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 07 Jul 2018 16:45:05 +0200 |
parents | 446c03a95578 |
children | 29cf38c5fec4 |
files | src/ex_docmd.c src/misc1.c src/version.c |
diffstat | 3 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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;