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)

b56195ed00
This commit is contained in:
Shougo
2016-08-17 22:24:20 +09:00
committed by Justin M. Keyes
parent 6b48d25cbf
commit dfb6a5133b
3 changed files with 38 additions and 4 deletions

View File

@@ -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;