From dfb6a5133b92ffb38bfb7201e91f3de328652558 Mon Sep 17 00:00:00 2001 From: Shougo Date: Wed, 17 Aug 2016 22:24:20 +0900 Subject: vim-patch:7.4.2112 (#5175) Problem: getcompletion(.., 'dir') returns a match with trailing "*" when there are no matches. (Chdiza) Solution: Return an empty list when there are no matches. Add a trailing slash to directories. (Yegappan Lakshmanan) Add tests for no matches. (closes vim/vim#947) https://github.com/vim/vim/commit/b56195ed00a9a79aa6217cddbeedbc8cc7a5b6d8 --- src/nvim/eval.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/nvim/eval.c') diff --git a/src/nvim/eval.c b/src/nvim/eval.c index f6545a5ca9..d936c9572a 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -9994,8 +9994,8 @@ static void f_getcompletion(typval_T *argvars, typval_T *rettv) { char_u *pat; expand_T xpc; - int options = WILD_KEEP_ALL | WILD_SILENT | WILD_USE_NL - | WILD_LIST_NOTFOUND | WILD_NO_BEEP; + int options = WILD_SILENT | WILD_USE_NL | WILD_ADD_SLASH + | WILD_NO_BEEP; if (p_wic) { options |= WILD_ICASE; -- cgit