Patch 8.2.5088
Problem:    Value of cmod_verbose is a bit complicated to use.
Solution:   Use zero for not set, value + 1 when set. (closes #10564)
Files:      src/ex_docmd.c, src/ex_getln.c, src/globals.h, src/structs.h


*** ../vim-8.2.5087/src/ex_docmd.c      2022-06-12 11:49:11.596611728 +0100
--- src/ex_docmd.c      2022-06-14 13:26:20.177328215 +0100
***************
*** 3089,3100 ****
                            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;
                        continue;
        }
--- 3089,3099 ----
                            break;
                        if (vim_isdigit(*eap->cmd))
                        {
!                           // zero means not set, one is verbose == 0, etc.
!                           cmod->cmod_verbose = atoi((char *)eap->cmd) + 1;
                        }
                        else
!                           cmod->cmod_verbose = 2;  // default: verbose == 1
                        eap->cmd = p;
                        continue;
        }
***************
*** 3147,3153 ****
                || (cmod->cmod_flags
                      & ~(CMOD_SILENT | CMOD_ERRSILENT | CMOD_UNSILENT)) != 0))
            || cmod->cmod_split != 0
!           || cmod->cmod_verbose != 0
            || cmod->cmod_tab != 0
            || cmod->cmod_filter_regmatch.regprog != NULL;
  }
--- 3146,3152 ----
                || (cmod->cmod_flags
                      & ~(CMOD_SILENT | CMOD_ERRSILENT | CMOD_UNSILENT)) != 0))
            || cmod->cmod_split != 0
!           || cmod->cmod_verbose > 0
            || cmod->cmod_tab != 0
            || cmod->cmod_filter_regmatch.regprog != NULL;
  }
***************
*** 3182,3192 ****
        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))
--- 3181,3191 ----
        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 - 1;
      }
  
      if ((cmod->cmod_flags & (CMOD_SILENT | CMOD_UNSILENT))
*** ../vim-8.2.5087/src/ex_getln.c      2022-06-05 16:55:50.694774344 +0100
--- src/ex_getln.c      2022-06-14 12:57:57.221166141 +0100
***************
*** 256,262 ****
      ea.cmd = ccline.cmdbuff;
      ea.addr_type = ADDR_LINES;
  
-     CLEAR_FIELD(dummy_cmdmod);
      parse_command_modifiers(&ea, &dummy, &dummy_cmdmod, TRUE);
  
      cmd = skip_range(ea.cmd, TRUE, NULL);
--- 256,261 ----
*** ../vim-8.2.5087/src/globals.h       2022-05-31 13:42:54.830788849 +0100
--- src/globals.h       2022-06-14 12:57:57.221166141 +0100
***************
*** 1291,1297 ****
  
  EXTERN int    postponed_split INIT(= 0);  // for CTRL-W CTRL-] command
  EXTERN int    postponed_split_flags INIT(= 0);  // args for win_split()
! EXTERN int    postponed_split_tab INIT(= 0);  // cmdmod.tab
  #ifdef FEAT_QUICKFIX
  EXTERN int    g_do_tagpreview INIT(= 0);  // for tag preview commands:
                                            // height of preview window
--- 1291,1297 ----
  
  EXTERN int    postponed_split INIT(= 0);  // for CTRL-W CTRL-] command
  EXTERN int    postponed_split_flags INIT(= 0);  // args for win_split()
! EXTERN int    postponed_split_tab INIT(= 0);  // cmdmod.cmod_tab
  #ifdef FEAT_QUICKFIX
  EXTERN int    g_do_tagpreview INIT(= 0);  // for tag preview commands:
                                            // height of preview window
*** ../vim-8.2.5087/src/structs.h       2022-06-13 21:42:40.949531347 +0100
--- src/structs.h       2022-06-14 13:26:55.449310663 +0100
***************
*** 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'
--- 662,669 ----
      regmatch_T        cmod_filter_regmatch;   // set by :filter /pat/
      int               cmod_filter_force;      // set for :filter!
  
!     int               cmod_verbose;           // 0 if not set, > 0 to set 
'verbose'
!                                       // to cmod_verbose - 1
  
      // values for undo_cmdmod()
      char_u    *cmod_save_ei;          // saved value of 'eventignore'
*** ../vim-8.2.5087/src/version.c       2022-06-14 12:30:21.829678742 +0100
--- src/version.c       2022-06-14 12:59:40.702153912 +0100
***************
*** 736,737 ****
--- 736,739 ----
  {   /* Add new patch number below this line */
+ /**/
+     5088,
  /**/

-- 
Close your shells, or I'll kill -9 you
Tomorrow I'll quota you
Remember the disks'll always be full
And then while I'm away
I'll write ~ everyday
And I'll send-pr all my buggings to you.
    [ CVS log "Beatles style" for FreeBSD ports/INDEX, Satoshi Asami ]

 /// 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/20220614123102.8F49A1C233D%40moolenaar.net.

Raspunde prin e-mail lui