diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-04-12 14:23:19 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-04-12 14:23:19 +0100 |
commit | 60895f3e36def9beb7d5463e792e5154ad9a7a0a (patch) | |
tree | e27a7746b43c278eb9ec66ef3a23086cf34a75bd /src/ex_docmd.c | |
parent | 575445200bd35283191ecd7a0d596b37c5b477a4 (diff) |
patch 8.2.4741: startup test failsv8.2.4741
Problem: Startup test fails.
Solution: Avoid an error for verbose expansion. Fix that the "0verbose"
command modifier doesn't work.
Diffstat (limited to 'src/ex_docmd.c')
-rw-r--r-- | src/ex_docmd.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/ex_docmd.c b/src/ex_docmd.c index 42824d7bb4..ceb500dc13 100644 --- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -3084,7 +3084,11 @@ parse_command_modifiers( 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,11 +3162,11 @@ apply_cmdmod(cmdmod_T *cmod) cmod->cmod_did_sandbox = TRUE; } #endif - if (cmod->cmod_verbose > 0) + if (cmod->cmod_verbose != 0) { if (cmod->cmod_verbose_save == 0) cmod->cmod_verbose_save = p_verbose + 1; - p_verbose = cmod->cmod_verbose; + p_verbose = cmod->cmod_verbose < 0 ? 0 : cmod->cmod_verbose; } if ((cmod->cmod_flags & (CMOD_SILENT | CMOD_UNSILENT)) @@ -8999,6 +9003,7 @@ find_cmdline_var(char_u *src, int *usedlen) * "<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 |