Patch 8.2.3550
Problem:    completion() does not work properly.
Solution:   Set xp_line and add WILD_HOME_REPLACE. (Shougo Matsushita,
            closes #9016)
Files:      src/cmdexpand.c, src/testdir/test_cmdline.vim


*** ../vim-8.2.3549/src/cmdexpand.c     2021-10-17 17:20:20.395745556 +0100
--- src/cmdexpand.c     2021-10-21 11:35:50.318256643 +0100
***************
*** 978,983 ****
--- 978,984 ----
  
      ExpandInit(xp);
      xp->xp_pattern = buff;
+     xp->xp_line = buff;
      xp->xp_context = EXPAND_COMMANDS; // Default until we get past command
      ea.argt = 0;
  
***************
*** 2891,2897 ****
      expand_T  xpc;
      int               filtered = FALSE;
      int               options = WILD_SILENT | WILD_USE_NL | WILD_ADD_SLASH
!                                                               | WILD_NO_BEEP;
  
      if (in_vim9script()
            && (check_for_string_arg(argvars, 0) == FAIL
--- 2892,2898 ----
      expand_T  xpc;
      int               filtered = FALSE;
      int               options = WILD_SILENT | WILD_USE_NL | WILD_ADD_SLASH
!                                       | WILD_NO_BEEP | WILD_HOME_REPLACE;
  
      if (in_vim9script()
            && (check_for_string_arg(argvars, 0) == FAIL
*** ../vim-8.2.3549/src/testdir/test_cmdline.vim        2021-10-17 
18:05:23.070999569 +0100
--- src/testdir/test_cmdline.vim        2021-10-21 11:35:50.318256643 +0100
***************
*** 305,310 ****
--- 305,315 ----
    let l = getcompletion('NoMatch', 'dir')
    call assert_equal([], l)
  
+   if glob('~/*') !=# ''
+     let l = getcompletion('~/', 'dir')
+     call assert_true(l[0][0] ==# '~')
+   endif
+ 
    let l = getcompletion('exe', 'expression')
    call assert_true(index(l, 'executable(') >= 0)
    let l = getcompletion('kill', 'expression')
***************
*** 418,423 ****
--- 423,438 ----
    let l = getcompletion('call paint', 'cmdline')
    call assert_equal([], l)
  
+   func T(a, c, p)
+     return "oneA\noneB\noneC"
+   endfunc
+   command -nargs=1 -complete=custom,T MyCmd
+   let l = getcompletion('MyCmd ', 'cmdline')
+   call assert_equal(['oneA', 'oneB', 'oneC'], l)
+ 
+   delcommand MyCmd
+   delfunc T
+ 
    " For others test if the name is recognized.
    let names = ['buffer', 'environment', 'file_in_path', 'mapping', 'tag', 
'tag_listfiles', 'user']
    if has('cmdline_hist')
*** ../vim-8.2.3549/src/version.c       2021-10-21 10:50:36.636964245 +0100
--- src/version.c       2021-10-21 11:39:26.501173536 +0100
***************
*** 759,760 ****
--- 759,762 ----
  {   /* Add new patch number below this line */
+ /**/
+     3550,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
214. Your MCI "Circle of Friends" are all Hayes-compatible.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20211021104051.49145C80053%40moolenaar.net.

Raspunde prin e-mail lui