Hi,

On Wed, Jul 27, 2016 at 9:13 AM, chdiza <[email protected]> wrote:

> Right, sorry, I forgot to mention that "Desktop" is the only thing in the
> dir that starts with "De". :)
>

The attached patch fixes this problem.

- Yegappan

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.
diff --git a/src/evalfunc.c b/src/evalfunc.c
index ae17038..53783af 100644
--- a/src/evalfunc.c
+++ b/src/evalfunc.c
@@ -4164,8 +4164,8 @@ 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;
@@ -4194,7 +4194,7 @@ f_getcompletion(typval_T *argvars, typval_T *rettv)
     pat = addstar(xpc.xp_pattern, xpc.xp_pattern_len, xpc.xp_context);
     if ((rettv_list_alloc(rettv) != FAIL) && (pat != NULL))
     {
-       int i;
+       int     i;
 
        ExpandOne(&xpc, pat, NULL, options, WILD_ALL_KEEP);
 
diff --git a/src/testdir/test_cmdline.vim b/src/testdir/test_cmdline.vim
index 0ddbcec..5bc28a8 100644
--- a/src/testdir/test_cmdline.vim
+++ b/src/testdir/test_cmdline.vim
@@ -61,7 +61,7 @@ func Test_getcompletion()
   call assert_true(index(l, 'sleep') >= 0)
 
   let l = getcompletion('', 'dir')
-  call assert_true(index(l, 'samples') >= 0)
+  call assert_true(index(l, 'samples/') >= 0)
 
   let l = getcompletion('exe', 'expression')
   call assert_true(index(l, 'executable(') >= 0)

Raspunde prin e-mail lui