Patch 8.2.4741 (after 8.2.4740)
Problem:    Startup test fails.
Solution:   Avoid an error for verbose expansion.  Fix that the "0verbose"
            command modifier doesn't work.
Files:      runtime/syntax/syntax.vim, runtime/syntax/synload.vim,
            src/structs.h, src/ex_docmd.c, src/testdir/test_excmd.vim


*** ../vim-8.2.4740/runtime/syntax/syntax.vim   2010-05-15 12:03:57.000000000 
+0100
--- runtime/syntax/syntax.vim   2022-04-12 13:55:20.338375447 +0100
***************
*** 28,35 ****
  
  " Set up the connection between FileType and Syntax autocommands.
  " This makes the syntax automatically set when the file type is detected.
  augroup syntaxset
!   au! FileType *      exe "set syntax=" . expand("<amatch>")
  augroup END
  
  
--- 28,36 ----
  
  " Set up the connection between FileType and Syntax autocommands.
  " This makes the syntax automatically set when the file type is detected.
+ " Avoid an error when 'verbose' is set and <amatch> expansion fails.
  augroup syntaxset
!   au! FileType *      0verbose exe "set syntax=" . expand("<amatch>")
  augroup END
  
  
*** ../vim-8.2.4740/runtime/syntax/synload.vim  2016-11-04 19:07:12.000000000 
+0000
--- runtime/syntax/synload.vim  2022-04-12 13:53:47.458142514 +0100
***************
*** 37,43 ****
      unlet b:current_syntax
    endif
  
!   let s = expand("<amatch>")
    if s == "ON"
      " :set syntax=ON
      if &filetype == ""
--- 37,43 ----
      unlet b:current_syntax
    endif
  
!   0verbose let s = expand("<amatch>")
    if s == "ON"
      " :set syntax=ON
      if &filetype == ""
***************
*** 52,60 ****
  
    if s != ""
      " Load the syntax file(s).  When there are several, separated by dots,
!     " load each in sequence.
      for name in split(s, '\.')
!       exe "runtime! syntax/" . name . ".vim syntax/" . name . "/*.vim"
      endfor
    endif
  endfun
--- 52,62 ----
  
    if s != ""
      " Load the syntax file(s).  When there are several, separated by dots,
!     " load each in sequence.  Skip empty entries.
      for name in split(s, '\.')
!       if !empty(name)
!       exe "runtime! syntax/" . name . ".vim syntax/" . name . "/*.vim"
!       endif
      endfor
    endif
  endfun
*** ../vim-8.2.4740/src/structs.h       2022-04-10 17:59:23.343015280 +0100
--- src/structs.h       2022-04-12 14:06:30.279047948 +0100
***************
*** 662,668 ****
      regmatch_T        cmod_filter_regmatch;   // set by :filter /pat/
      int               cmod_filter_force;      // set for :filter!
  
!     int               cmod_verbose;           // non-zero to set 'verbose'
  
      // values for undo_cmdmod()
      char_u    *cmod_save_ei;          // saved value of 'eventignore'
--- 662,669 ----
      regmatch_T        cmod_filter_regmatch;   // set by :filter /pat/
      int               cmod_filter_force;      // set for :filter!
  
!     int               cmod_verbose;           // non-zero to set 'verbose', 
-1 is
!                                       // used for zero override
  
      // values for undo_cmdmod()
      char_u    *cmod_save_ei;          // saved value of 'eventignore'
*** ../vim-8.2.4740/src/ex_docmd.c      2022-04-09 21:41:22.266689586 +0100
--- src/ex_docmd.c      2022-04-12 14:11:14.727055505 +0100
***************
*** 3084,3090 ****
--- 3084,3094 ----
                        if (!checkforcmd_noparen(&p, "verbose", 4))
                            break;
                        if (vim_isdigit(*eap->cmd))
+                       {
                            cmod->cmod_verbose = atoi((char *)eap->cmd);
+                           if (cmod->cmod_verbose == 0)
+                               cmod->cmod_verbose = -1;
+                       }
                        else
                            cmod->cmod_verbose = 1;
                        eap->cmd = p;
***************
*** 3158,3168 ****
        cmod->cmod_did_sandbox = TRUE;
      }
  #endif
!     if (cmod->cmod_verbose > 0)
      {
        if (cmod->cmod_verbose_save == 0)
            cmod->cmod_verbose_save = p_verbose + 1;
!       p_verbose = cmod->cmod_verbose;
      }
  
      if ((cmod->cmod_flags & (CMOD_SILENT | CMOD_UNSILENT))
--- 3162,3172 ----
        cmod->cmod_did_sandbox = TRUE;
      }
  #endif
!     if (cmod->cmod_verbose != 0)
      {
        if (cmod->cmod_verbose_save == 0)
            cmod->cmod_verbose_save = p_verbose + 1;
!       p_verbose = cmod->cmod_verbose < 0 ? 0 : cmod->cmod_verbose;
      }
  
      if ((cmod->cmod_flags & (CMOD_SILENT | CMOD_UNSILENT))
***************
*** 8999,9004 ****
--- 9003,9009 ----
   *      "<cfile>" to path name under the cursor
   *      "<sfile>" to sourced file name
   *      "<stack>" to call stack
+  *      "<script>" to current script name
   *      "<slnum>" to sourced file line number
   *      "<afile>" to file name for autocommand
   *      "<abuf>"  to buffer number for autocommand
*** ../vim-8.2.4740/src/testdir/test_excmd.vim  2022-01-11 19:34:12.449500357 
+0000
--- src/testdir/test_excmd.vim  2022-04-12 14:15:57.722993456 +0100
***************
*** 580,589 ****
  
  " Test for the :verbose command
  func Test_verbose_cmd()
!   call assert_equal(['  verbose=1'], split(execute('verbose set vbs'), "\n"))
    call assert_equal(['  verbose=0'], split(execute('0verbose set vbs'), "\n"))
!   let l = execute("4verbose set verbose | set verbose")
!   call assert_equal(['  verbose=4', '  verbose=0'], split(l, "\n"))
  endfunc
  
  " Test for the :delete command and the related abbreviated commands
--- 580,591 ----
  
  " Test for the :verbose command
  func Test_verbose_cmd()
!   set verbose=3
!   call assert_match('  verbose=1\n\s*Last set from ', execute('verbose set 
vbs'), "\n")
    call assert_equal(['  verbose=0'], split(execute('0verbose set vbs'), "\n"))
!   set verbose=0
!   call assert_match('  verbose=4\n\s*Last set from .*\n  verbose=0',
!         \ execute("4verbose set verbose | set verbose"))
  endfunc
  
  " Test for the :delete command and the related abbreviated commands
*** ../vim-8.2.4740/src/version.c       2022-04-12 12:54:06.921010955 +0100
--- src/version.c       2022-04-12 13:01:08.765186247 +0100
***************
*** 748,749 ****
--- 748,751 ----
  {   /* Add new patch number below this line */
+ /**/
+     4741,
  /**/

-- 
It is too bad that the speed of light hasn't kept pace with the
changes in CPU speed and network bandwidth. -- <[email protected]>

 /// 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/20220412132345.CE84A1C08E1%40moolenaar.net.

Raspunde prin e-mail lui