3ef2ca
To: vim_dev@googlegroups.com
3ef2ca
Subject: Patch 7.4.531
3ef2ca
Fcc: outbox
3ef2ca
From: Bram Moolenaar <Bram@moolenaar.net>
3ef2ca
Mime-Version: 1.0
3ef2ca
Content-Type: text/plain; charset=UTF-8
3ef2ca
Content-Transfer-Encoding: 8bit
3ef2ca
------------
3ef2ca
3ef2ca
Patch 7.4.531
3ef2ca
Problem:    Comments about parsing an Ex command are wrong.
3ef2ca
Solution:   Correct the steop numbers.
3ef2ca
Files:	    src/ex_docmd.c
3ef2ca
3ef2ca
3ef2ca
*** ../vim-7.4.530/src/ex_docmd.c	2014-11-27 16:22:42.742413039 +0100
3ef2ca
--- src/ex_docmd.c	2014-11-27 16:37:22.164760647 +0100
3ef2ca
***************
3ef2ca
*** 1721,1728 ****
3ef2ca
   *
3ef2ca
   * 1. skip comment lines and leading space
3ef2ca
   * 2. handle command modifiers
3ef2ca
!  * 3. parse command
3ef2ca
   * 4. parse range
3ef2ca
   * 6. parse arguments
3ef2ca
   * 7. switch on command name
3ef2ca
   *
3ef2ca
--- 1721,1729 ----
3ef2ca
   *
3ef2ca
   * 1. skip comment lines and leading space
3ef2ca
   * 2. handle command modifiers
3ef2ca
!  * 3. find the command
3ef2ca
   * 4. parse range
3ef2ca
+  * 5. Parse the command.
3ef2ca
   * 6. parse arguments
3ef2ca
   * 7. switch on command name
3ef2ca
   *
3ef2ca
***************
3ef2ca
*** 2335,2341 ****
3ef2ca
  	ea.forceit = FALSE;
3ef2ca
  
3ef2ca
  /*
3ef2ca
!  * 5. Parse arguments.
3ef2ca
   */
3ef2ca
      if (!IS_USER_CMDIDX(ea.cmdidx))
3ef2ca
  	ea.argt = (long)cmdnames[(int)ea.cmdidx].cmd_argt;
3ef2ca
--- 2336,2342 ----
3ef2ca
  	ea.forceit = FALSE;
3ef2ca
  
3ef2ca
  /*
3ef2ca
!  * 6. Parse arguments.
3ef2ca
   */
3ef2ca
      if (!IS_USER_CMDIDX(ea.cmdidx))
3ef2ca
  	ea.argt = (long)cmdnames[(int)ea.cmdidx].cmd_argt;
3ef2ca
***************
3ef2ca
*** 2782,2788 ****
3ef2ca
  #endif
3ef2ca
  
3ef2ca
  /*
3ef2ca
!  * 6. Switch on command name.
3ef2ca
   *
3ef2ca
   * The "ea" structure holds the arguments that can be used.
3ef2ca
   */
3ef2ca
--- 2783,2789 ----
3ef2ca
  #endif
3ef2ca
  
3ef2ca
  /*
3ef2ca
!  * 7. Switch on command name.
3ef2ca
   *
3ef2ca
   * The "ea" structure holds the arguments that can be used.
3ef2ca
   */
3ef2ca
***************
3ef2ca
*** 3319,3325 ****
3ef2ca
      ea.argt = 0;
3ef2ca
  
3ef2ca
  /*
3ef2ca
!  * 2. skip comment lines and leading space, colons or bars
3ef2ca
   */
3ef2ca
      for (cmd = buff; vim_strchr((char_u *)" \t:|", *cmd) != NULL; cmd++)
3ef2ca
  	;
3ef2ca
--- 3320,3326 ----
3ef2ca
      ea.argt = 0;
3ef2ca
  
3ef2ca
  /*
3ef2ca
!  * 1. skip comment lines and leading space, colons or bars
3ef2ca
   */
3ef2ca
      for (cmd = buff; vim_strchr((char_u *)" \t:|", *cmd) != NULL; cmd++)
3ef2ca
  	;
3ef2ca
***************
3ef2ca
*** 3334,3346 ****
3ef2ca
      }
3ef2ca
  
3ef2ca
  /*
3ef2ca
!  * 3. parse a range specifier of the form: addr [,addr] [;addr] ..
3ef2ca
   */
3ef2ca
      cmd = skip_range(cmd, &xp->xp_context);
3ef2ca
- 
3ef2ca
- /*
3ef2ca
-  * 4. parse command
3ef2ca
-  */
3ef2ca
      xp->xp_pattern = cmd;
3ef2ca
      if (*cmd == NUL)
3ef2ca
  	return NULL;
3ef2ca
--- 3335,3343 ----
3ef2ca
      }
3ef2ca
  
3ef2ca
  /*
3ef2ca
!  * 3. Skip over the range to find the command.
3ef2ca
   */
3ef2ca
      cmd = skip_range(cmd, &xp->xp_context);
3ef2ca
      xp->xp_pattern = cmd;
3ef2ca
      if (*cmd == NUL)
3ef2ca
  	return NULL;
3ef2ca
***************
3ef2ca
*** 3446,3452 ****
3ef2ca
      }
3ef2ca
  
3ef2ca
  /*
3ef2ca
!  * 5. parse arguments
3ef2ca
   */
3ef2ca
      if (!IS_USER_CMDIDX(ea.cmdidx))
3ef2ca
  	ea.argt = (long)cmdnames[(int)ea.cmdidx].cmd_argt;
3ef2ca
--- 3443,3449 ----
3ef2ca
      }
3ef2ca
  
3ef2ca
  /*
3ef2ca
!  * 6. parse arguments
3ef2ca
   */
3ef2ca
      if (!IS_USER_CMDIDX(ea.cmdidx))
3ef2ca
  	ea.argt = (long)cmdnames[(int)ea.cmdidx].cmd_argt;
3ef2ca
***************
3ef2ca
*** 3682,3688 ****
3ef2ca
      }
3ef2ca
  
3ef2ca
  /*
3ef2ca
!  * 6. switch on command name
3ef2ca
   */
3ef2ca
      switch (ea.cmdidx)
3ef2ca
      {
3ef2ca
--- 3679,3685 ----
3ef2ca
      }
3ef2ca
  
3ef2ca
  /*
3ef2ca
!  * 6. Switch on command name.
3ef2ca
   */
3ef2ca
      switch (ea.cmdidx)
3ef2ca
      {
3ef2ca
*** ../vim-7.4.530/src/version.c	2014-11-27 16:22:42.746412995 +0100
3ef2ca
--- src/version.c	2014-11-27 16:30:25.149339297 +0100
3ef2ca
***************
3ef2ca
*** 743,744 ****
3ef2ca
--- 743,746 ----
3ef2ca
  {   /* Add new patch number below this line */
3ef2ca
+ /**/
3ef2ca
+     531,
3ef2ca
  /**/
3ef2ca
3ef2ca
-- 
3ef2ca
Wi n0t trei a h0liday in Sweden thi yer?
3ef2ca
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
3ef2ca
3ef2ca
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
3ef2ca
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
3ef2ca
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
3ef2ca
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///