To: vim_dev@googlegroups.com Subject: Patch 8.2.4741 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ 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("") 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 expansion fails. augroup syntaxset ! au! FileType * 0verbose exe "set syntax=" . expand("") 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("") if s == "ON" " :set syntax=ON if &filetype == "" --- 37,43 ---- unlet b:current_syntax endif ! 0verbose let s = expand("") 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 ---- * "" to path name under the cursor * "" to sourced file name * "" to call stack + * "