Patch 8.2.3377
Problem:    Vim9: :disass completion does not understand "s:".
Solution:   Expand "s:" to a pattern. (closes #8780)
Files:      src/cmdexpand.c, src/testdir/test_cmdline.vim


*** ../vim-8.2.3376/src/cmdexpand.c     2021-07-20 17:51:48.239744107 +0200
--- src/cmdexpand.c     2021-08-26 16:38:49.090544474 +0200
***************
*** 2073,2079 ****
  
      // When expanding a function name starting with s:, match the <SNR>nr_
      // prefix.
!     if (xp->xp_context == EXPAND_USER_FUNC && STRNCMP(pat, "^s:", 3) == 0)
      {
        int len = (int)STRLEN(pat) + 20;
  
--- 2073,2081 ----
  
      // When expanding a function name starting with s:, match the <SNR>nr_
      // prefix.
!     if ((xp->xp_context == EXPAND_USER_FUNC
!                                      || xp->xp_context == EXPAND_DISASSEMBLE)
!           && STRNCMP(pat, "^s:", 3) == 0)
      {
        int len = (int)STRLEN(pat) + 20;
  
*** ../vim-8.2.3376/src/testdir/test_cmdline.vim        2021-08-21 
17:13:08.569405922 +0200
--- src/testdir/test_cmdline.vim        2021-08-26 16:38:14.074616753 +0200
***************
*** 751,756 ****
--- 751,761 ----
    unlet g:SomeVar
  endfunc
  
+ " Unique function name for completion below
+ func s:WeirdFunc()
+   echo 'weird'
+ endfunc
+ 
  " Test for various command-line completion
  func Test_cmdline_complete_various()
    " completion for a command starting with a comment
***************
*** 833,838 ****
--- 838,846 ----
    call feedkeys(":disas profile 
Test_cmdline_complete_var\<C-A>\<C-B>\"\<CR>", 'xt')
    call assert_equal("\"disas profile Test_cmdline_complete_various", @:)
  
+   call feedkeys(":disas s:WeirdF\<C-A>\<C-B>\"\<CR>", 'xt')
+   call assert_match('"disas <SNR>\d\+_WeirdFunc()', @:)
+ 
    " completion for the :match command
    call feedkeys(":match Search /pat/\<C-A>\<C-B>\"\<CR>", 'xt')
    call assert_equal("\"match Search /pat/\<C-A>", @:)
*** ../vim-8.2.3376/src/version.c       2021-08-25 22:37:33.107295294 +0200
--- src/version.c       2021-08-26 16:34:25.675085091 +0200
***************
*** 757,758 ****
--- 757,760 ----
  {   /* Add new patch number below this line */
+ /**/
+     3377,
  /**/

-- 
./configure
Checking whether build environment is sane ...
build environment is grinning and holding a spatula.  Guess not.

 /// 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/202108261440.17QEeSxf2539058%40masaka.moolenaar.net.

Raspunde prin e-mail lui