Karsten Hopp 4e1a0b
To: vim_dev@googlegroups.com
Karsten Hopp 4e1a0b
Subject: Patch 7.4.754
Karsten Hopp 4e1a0b
Fcc: outbox
Karsten Hopp 4e1a0b
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp 4e1a0b
Mime-Version: 1.0
Karsten Hopp 4e1a0b
Content-Type: text/plain; charset=UTF-8
Karsten Hopp 4e1a0b
Content-Transfer-Encoding: 8bit
Karsten Hopp 4e1a0b
------------
Karsten Hopp 4e1a0b
Karsten Hopp 4e1a0b
Patch 7.4.754
Karsten Hopp 4e1a0b
Problem:    Using CTRL-A in Visual mode does not work well. (Gary Johnson)
Karsten Hopp 4e1a0b
Solution:   Make it increment all numbers in the Visual area. (Christian
Karsten Hopp 4e1a0b
            Brabandt)
Karsten Hopp 4e1a0b
Files:      runtime/doc/change.txt, src/normal.c, src/ops.c,
Karsten Hopp 4e1a0b
            src/proto/ops.pro, src/testdir/Make_amiga.mak,
Karsten Hopp 4e1a0b
            src/testdir/Make_dos.mak, src/testdir/Make_ming.mak,
Karsten Hopp 4e1a0b
            src/testdir/Make_os2.mak, src/testdir/Make_vms.mms,
Karsten Hopp 4e1a0b
            src/testdir/Makefile, src/testdir/test_increment.in,
Karsten Hopp 4e1a0b
            src/testdir/test_increment.ok
Karsten Hopp 4e1a0b
Karsten Hopp 4e1a0b
Karsten Hopp 4e1a0b
*** ../vim-7.4.753/runtime/doc/change.txt	2015-01-27 18:43:42.134535513 +0100
Karsten Hopp 4e1a0b
--- runtime/doc/change.txt	2015-06-25 13:55:43.686428819 +0200
Karsten Hopp 4e1a0b
***************
Karsten Hopp 4e1a0b
*** 156,161 ****
Karsten Hopp 4e1a0b
--- 156,164 ----
Karsten Hopp 4e1a0b
  The 'B' and 'M' flags in 'formatoptions' change the behavior for inserting
Karsten Hopp 4e1a0b
  spaces before and after a multi-byte character |fo-table|.
Karsten Hopp 4e1a0b
  
Karsten Hopp 4e1a0b
+ The '[ mark is set at the end of the first line that was joined, '] at the end
Karsten Hopp 4e1a0b
+ of the resulting line.
Karsten Hopp 4e1a0b
+ 
Karsten Hopp 4e1a0b
  
Karsten Hopp 4e1a0b
  ==============================================================================
Karsten Hopp 4e1a0b
  2. Delete and insert				*delete-insert* *replacing*
Karsten Hopp 4e1a0b
***************
Karsten Hopp 4e1a0b
*** 376,385 ****
Karsten Hopp 4e1a0b
--- 379,421 ----
Karsten Hopp 4e1a0b
  CTRL-A			Add [count] to the number or alphabetic character at
Karsten Hopp 4e1a0b
  			or after the cursor.  {not in Vi}
Karsten Hopp 4e1a0b
  
Karsten Hopp 4e1a0b
+ 							*v_CTRL-A*
Karsten Hopp 4e1a0b
+ {Visual}CTRL-A		Add [count] to the number or alphabetic character in
Karsten Hopp 4e1a0b
+ 			the highlighted text.  {not in Vi}
Karsten Hopp 4e1a0b
+ 
Karsten Hopp 4e1a0b
+ 							*v_g_CTRL-A*
Karsten Hopp 4e1a0b
+ {Visual}g CTRL-A	Add [count] to the number or alphabetic character in
Karsten Hopp 4e1a0b
+ 			the highlighted text. If several lines are
Karsten Hopp 4e1a0b
+ 		        highlighted, each one will be incremented by an
Karsten Hopp 4e1a0b
+ 			additional [count] (so effectively creating a
Karsten Hopp 4e1a0b
+ 			[count] incrementing sequence).  {not in Vi}
Karsten Hopp 4e1a0b
+ 			For Example, if you have this list of numbers:
Karsten Hopp 4e1a0b
+ 				1. ~
Karsten Hopp 4e1a0b
+ 				1. ~
Karsten Hopp 4e1a0b
+ 				1. ~
Karsten Hopp 4e1a0b
+ 				1. ~
Karsten Hopp 4e1a0b
+ 			Move to the second "1." and Visually select three
Karsten Hopp 4e1a0b
+ 			lines, pressing g CTRL-A results in:
Karsten Hopp 4e1a0b
+ 				1. ~
Karsten Hopp 4e1a0b
+ 				2. ~
Karsten Hopp 4e1a0b
+ 				3. ~
Karsten Hopp 4e1a0b
+ 				4. ~
Karsten Hopp 4e1a0b
+ 
Karsten Hopp 4e1a0b
  							*CTRL-X*
Karsten Hopp 4e1a0b
  CTRL-X			Subtract [count] from the number or alphabetic
Karsten Hopp 4e1a0b
  			character at or after the cursor.  {not in Vi}
Karsten Hopp 4e1a0b
  
Karsten Hopp 4e1a0b
+ 							*v_CTRL-X*
Karsten Hopp 4e1a0b
+ {Visual}CTRL-X		Subtract [count] from the number or alphabetic
Karsten Hopp 4e1a0b
+ 			character in the highlighted text.  {not in Vi}
Karsten Hopp 4e1a0b
+ 
Karsten Hopp 4e1a0b
+ 							*v_g_CTRL-X*
Karsten Hopp 4e1a0b
+ {Visual}g CTRL-X	Subtract [count] from the number or alphabetic
Karsten Hopp 4e1a0b
+ 			character in the highlighted text. If several lines
Karsten Hopp 4e1a0b
+ 			are highlighted, each value will be decremented by an
Karsten Hopp 4e1a0b
+ 			additional [count] (so effectively creating a [count]
Karsten Hopp 4e1a0b
+ 			decrementing sequence).  {not in Vi}
Karsten Hopp 4e1a0b
+ 
Karsten Hopp 4e1a0b
  The CTRL-A and CTRL-X commands work for (signed) decimal numbers, unsigned
Karsten Hopp 4e1a0b
  octal and hexadecimal numbers and alphabetic characters.  This depends on the
Karsten Hopp 4e1a0b
  'nrformats' option.
Karsten Hopp 4e1a0b
***************
Karsten Hopp 4e1a0b
*** 396,401 ****
Karsten Hopp 4e1a0b
--- 432,440 ----
Karsten Hopp 4e1a0b
    under or after the cursor.  This is useful to make lists with an alphabetic
Karsten Hopp 4e1a0b
    index.
Karsten Hopp 4e1a0b
  
Karsten Hopp 4e1a0b
+ For decimals a leading negative sign is considered for incrementing/
Karsten Hopp 4e1a0b
+ decrementing, for octal and hey values, it won't be considered.
Karsten Hopp 4e1a0b
+ 
Karsten Hopp 4e1a0b
  For numbers with leading zeros (including all octal and hexadecimal numbers),
Karsten Hopp 4e1a0b
  Vim preserves the number of characters in the number when possible.  CTRL-A on
Karsten Hopp 4e1a0b
  "0077" results in "0100", CTRL-X on "0x100" results in "0x0ff".
Karsten Hopp 4e1a0b
*** ../vim-7.4.753/src/normal.c	2015-06-25 13:30:41.206095684 +0200
Karsten Hopp 4e1a0b
--- src/normal.c	2015-06-25 13:42:06.342924954 +0200
Karsten Hopp 4e1a0b
***************
Karsten Hopp 4e1a0b
*** 4201,4209 ****
Karsten Hopp 4e1a0b
  nv_addsub(cap)
Karsten Hopp 4e1a0b
      cmdarg_T	*cap;
Karsten Hopp 4e1a0b
  {
Karsten Hopp 4e1a0b
!     if (!checkclearopq(cap->oap)
Karsten Hopp 4e1a0b
! 	    && do_addsub((int)cap->cmdchar, cap->count1) == OK)
Karsten Hopp 4e1a0b
  	prep_redo_cmd(cap);
Karsten Hopp 4e1a0b
  }
Karsten Hopp 4e1a0b
  
Karsten Hopp 4e1a0b
  /*
Karsten Hopp 4e1a0b
--- 4201,4217 ----
Karsten Hopp 4e1a0b
  nv_addsub(cap)
Karsten Hopp 4e1a0b
      cmdarg_T	*cap;
Karsten Hopp 4e1a0b
  {
Karsten Hopp 4e1a0b
!     int visual = VIsual_active;
Karsten Hopp 4e1a0b
!     if (cap->oap->op_type == OP_NOP
Karsten Hopp 4e1a0b
! 	    && do_addsub((int)cap->cmdchar, cap->count1, cap->arg) == OK)
Karsten Hopp 4e1a0b
  	prep_redo_cmd(cap);
Karsten Hopp 4e1a0b
+     else
Karsten Hopp 4e1a0b
+ 	clearopbeep(cap->oap);
Karsten Hopp 4e1a0b
+     if (visual)
Karsten Hopp 4e1a0b
+     {
Karsten Hopp 4e1a0b
+ 	VIsual_active = FALSE;
Karsten Hopp 4e1a0b
+ 	redraw_later(CLEAR);
Karsten Hopp 4e1a0b
+     }
Karsten Hopp 4e1a0b
  }
Karsten Hopp 4e1a0b
  
Karsten Hopp 4e1a0b
  /*
Karsten Hopp 4e1a0b
***************
Karsten Hopp 4e1a0b
*** 7841,7854 ****
Karsten Hopp 4e1a0b
  
Karsten Hopp 4e1a0b
      switch (cap->nchar)
Karsten Hopp 4e1a0b
      {
Karsten Hopp 4e1a0b
  #ifdef MEM_PROFILE
Karsten Hopp 4e1a0b
      /*
Karsten Hopp 4e1a0b
       * "g^A": dump log of used memory.
Karsten Hopp 4e1a0b
       */
Karsten Hopp 4e1a0b
!     case Ctrl_A:
Karsten Hopp 4e1a0b
! 	vim_mem_profile_dump();
Karsten Hopp 4e1a0b
! 	break;
Karsten Hopp 4e1a0b
  #endif
Karsten Hopp 4e1a0b
  
Karsten Hopp 4e1a0b
  #ifdef FEAT_VREPLACE
Karsten Hopp 4e1a0b
      /*
Karsten Hopp 4e1a0b
--- 7849,7876 ----
Karsten Hopp 4e1a0b
  
Karsten Hopp 4e1a0b
      switch (cap->nchar)
Karsten Hopp 4e1a0b
      {
Karsten Hopp 4e1a0b
+     case Ctrl_A:
Karsten Hopp 4e1a0b
+     case Ctrl_X:
Karsten Hopp 4e1a0b
  #ifdef MEM_PROFILE
Karsten Hopp 4e1a0b
      /*
Karsten Hopp 4e1a0b
       * "g^A": dump log of used memory.
Karsten Hopp 4e1a0b
       */
Karsten Hopp 4e1a0b
! 	if (!VIsual_active && cap->nchar == Ctrl_A)
Karsten Hopp 4e1a0b
! 	    vim_mem_profile_dump();
Karsten Hopp 4e1a0b
! 	else
Karsten Hopp 4e1a0b
  #endif
Karsten Hopp 4e1a0b
+     /*
Karsten Hopp 4e1a0b
+      * "g^A/g^X": sequentially increment visually selected region
Karsten Hopp 4e1a0b
+      */
Karsten Hopp 4e1a0b
+ 	     if (VIsual_active)
Karsten Hopp 4e1a0b
+ 	{
Karsten Hopp 4e1a0b
+ 	    cap->arg = TRUE;
Karsten Hopp 4e1a0b
+ 	    cap->cmdchar = cap->nchar;
Karsten Hopp 4e1a0b
+ 	    nv_addsub(cap);
Karsten Hopp 4e1a0b
+ 	}
Karsten Hopp 4e1a0b
+ 	else
Karsten Hopp 4e1a0b
+ 	    clearopbeep(oap);
Karsten Hopp 4e1a0b
+ 	break;
Karsten Hopp 4e1a0b
  
Karsten Hopp 4e1a0b
  #ifdef FEAT_VREPLACE
Karsten Hopp 4e1a0b
      /*
Karsten Hopp 4e1a0b
*** ../vim-7.4.753/src/ops.c	2015-06-19 15:17:49.891065610 +0200
Karsten Hopp 4e1a0b
--- src/ops.c	2015-06-25 13:44:44.285272132 +0200
Karsten Hopp 4e1a0b
***************
Karsten Hopp 4e1a0b
*** 5375,5383 ****
Karsten Hopp 4e1a0b
   * return FAIL for failure, OK otherwise
Karsten Hopp 4e1a0b
   */
Karsten Hopp 4e1a0b
      int
Karsten Hopp 4e1a0b
! do_addsub(command, Prenum1)
Karsten Hopp 4e1a0b
      int		command;
Karsten Hopp 4e1a0b
      linenr_T	Prenum1;
Karsten Hopp 4e1a0b
  {
Karsten Hopp 4e1a0b
      int		col;
Karsten Hopp 4e1a0b
      char_u	*buf1;
Karsten Hopp 4e1a0b
--- 5375,5384 ----
Karsten Hopp 4e1a0b
   * return FAIL for failure, OK otherwise
Karsten Hopp 4e1a0b
   */
Karsten Hopp 4e1a0b
      int
Karsten Hopp 4e1a0b
! do_addsub(command, Prenum1, g_cmd)
Karsten Hopp 4e1a0b
      int		command;
Karsten Hopp 4e1a0b
      linenr_T	Prenum1;
Karsten Hopp 4e1a0b
+     int		g_cmd;		    /* was g<c-a>/g<c-x> */
Karsten Hopp 4e1a0b
  {
Karsten Hopp 4e1a0b
      int		col;
Karsten Hopp 4e1a0b
      char_u	*buf1;
Karsten Hopp 4e1a0b
***************
Karsten Hopp 4e1a0b
*** 5385,5390 ****
Karsten Hopp 4e1a0b
--- 5386,5392 ----
Karsten Hopp 4e1a0b
      int		hex;		/* 'X' or 'x': hex; '0': octal */
Karsten Hopp 4e1a0b
      static int	hexupper = FALSE;	/* 0xABC */
Karsten Hopp 4e1a0b
      unsigned long n;
Karsten Hopp 4e1a0b
+     long	offset = 0;		/* line offset for Ctrl_V mode */
Karsten Hopp 4e1a0b
      long_u	oldn;
Karsten Hopp 4e1a0b
      char_u	*ptr;
Karsten Hopp 4e1a0b
      int		c;
Karsten Hopp 4e1a0b
***************
Karsten Hopp 4e1a0b
*** 5394,5640 ****
Karsten Hopp 4e1a0b
      int		dooct;
Karsten Hopp 4e1a0b
      int		doalp;
Karsten Hopp 4e1a0b
      int		firstdigit;
Karsten Hopp 4e1a0b
-     int		negative;
Karsten Hopp 4e1a0b
      int		subtract;
Karsten Hopp 4e1a0b
  
Karsten Hopp 4e1a0b
      dohex = (vim_strchr(curbuf->b_p_nf, 'x') != NULL);	/* "heX" */
Karsten Hopp 4e1a0b
      dooct = (vim_strchr(curbuf->b_p_nf, 'o') != NULL);	/* "Octal" */
Karsten Hopp 4e1a0b
      doalp = (vim_strchr(curbuf->b_p_nf, 'p') != NULL);	/* "alPha" */
Karsten Hopp 4e1a0b
  
Karsten Hopp 4e1a0b
-     ptr = ml_get_curline();
Karsten Hopp 4e1a0b
-     RLADDSUBFIX(ptr);
Karsten Hopp 4e1a0b
- 
Karsten Hopp 4e1a0b
      /*
Karsten Hopp 4e1a0b
       * First check if we are on a hexadecimal number, after the "0x".
Karsten Hopp 4e1a0b
       */
Karsten Hopp 4e1a0b
      col = curwin->w_cursor.col;
Karsten Hopp 4e1a0b
!     if (dohex)
Karsten Hopp 4e1a0b
! 	while (col > 0 && vim_isxdigit(ptr[col]))
Karsten Hopp 4e1a0b
! 	    --col;
Karsten Hopp 4e1a0b
!     if (       dohex
Karsten Hopp 4e1a0b
! 	    && col > 0
Karsten Hopp 4e1a0b
! 	    && (ptr[col] == 'X'
Karsten Hopp 4e1a0b
! 		|| ptr[col] == 'x')
Karsten Hopp 4e1a0b
! 	    && ptr[col - 1] == '0'
Karsten Hopp 4e1a0b
! 	    && vim_isxdigit(ptr[col + 1]))
Karsten Hopp 4e1a0b
      {
Karsten Hopp 4e1a0b
! 	/*
Karsten Hopp 4e1a0b
! 	 * Found hexadecimal number, move to its start.
Karsten Hopp 4e1a0b
! 	 */
Karsten Hopp 4e1a0b
! 	--col;
Karsten Hopp 4e1a0b
      }
Karsten Hopp 4e1a0b
      else
Karsten Hopp 4e1a0b
      {
Karsten Hopp 4e1a0b
! 	/*
Karsten Hopp 4e1a0b
! 	 * Search forward and then backward to find the start of number.
Karsten Hopp 4e1a0b
! 	 */
Karsten Hopp 4e1a0b
! 	col = curwin->w_cursor.col;
Karsten Hopp 4e1a0b
  
Karsten Hopp 4e1a0b
! 	while (ptr[col] != NUL
Karsten Hopp 4e1a0b
! 		&& !vim_isdigit(ptr[col])
Karsten Hopp 4e1a0b
! 		&& !(doalp && ASCII_ISALPHA(ptr[col])))
Karsten Hopp 4e1a0b
! 	    ++col;
Karsten Hopp 4e1a0b
! 
Karsten Hopp 4e1a0b
! 	while (col > 0
Karsten Hopp 4e1a0b
! 		&& vim_isdigit(ptr[col - 1])
Karsten Hopp 4e1a0b
! 		&& !(doalp && ASCII_ISALPHA(ptr[col])))
Karsten Hopp 4e1a0b
  	    --col;
Karsten Hopp 4e1a0b
      }
Karsten Hopp 4e1a0b
  
Karsten Hopp 4e1a0b
!     /*
Karsten Hopp 4e1a0b
!      * If a number was found, and saving for undo works, replace the number.
Karsten Hopp 4e1a0b
!      */
Karsten Hopp 4e1a0b
!     firstdigit = ptr[col];
Karsten Hopp 4e1a0b
!     RLADDSUBFIX(ptr);
Karsten Hopp 4e1a0b
!     if ((!VIM_ISDIGIT(firstdigit) && !(doalp && ASCII_ISALPHA(firstdigit)))
Karsten Hopp 4e1a0b
! 	    || u_save_cursor() != OK)
Karsten Hopp 4e1a0b
      {
Karsten Hopp 4e1a0b
! 	beep_flush();
Karsten Hopp 4e1a0b
! 	return FAIL;
Karsten Hopp 4e1a0b
!     }
Karsten Hopp 4e1a0b
  
Karsten Hopp 4e1a0b
!     /* get ptr again, because u_save() may have changed it */
Karsten Hopp 4e1a0b
!     ptr = ml_get_curline();
Karsten Hopp 4e1a0b
!     RLADDSUBFIX(ptr);
Karsten Hopp 4e1a0b
  
Karsten Hopp 4e1a0b
!     if (doalp && ASCII_ISALPHA(firstdigit))
Karsten Hopp 4e1a0b
!     {
Karsten Hopp 4e1a0b
! 	/* decrement or increment alphabetic character */
Karsten Hopp 4e1a0b
! 	if (command == Ctrl_X)
Karsten Hopp 4e1a0b
  	{
Karsten Hopp 4e1a0b
! 	    if (CharOrd(firstdigit) < Prenum1)
Karsten Hopp 4e1a0b
  	    {
Karsten Hopp 4e1a0b
! 		if (isupper(firstdigit))
Karsten Hopp 4e1a0b
! 		    firstdigit = 'A';
Karsten Hopp 4e1a0b
  		else
Karsten Hopp 4e1a0b
- 		    firstdigit = 'a';
Karsten Hopp 4e1a0b
- 	    }
Karsten Hopp 4e1a0b
- 	    else
Karsten Hopp 4e1a0b
  #ifdef EBCDIC
Karsten Hopp 4e1a0b
! 		firstdigit = EBCDIC_CHAR_ADD(firstdigit, -Prenum1);
Karsten Hopp 4e1a0b
  #else
Karsten Hopp 4e1a0b
! 		firstdigit -= Prenum1;
Karsten Hopp 4e1a0b
  #endif
Karsten Hopp 4e1a0b
- 	}
Karsten Hopp 4e1a0b
- 	else
Karsten Hopp 4e1a0b
- 	{
Karsten Hopp 4e1a0b
- 	    if (26 - CharOrd(firstdigit) - 1 < Prenum1)
Karsten Hopp 4e1a0b
- 	    {
Karsten Hopp 4e1a0b
- 		if (isupper(firstdigit))
Karsten Hopp 4e1a0b
- 		    firstdigit = 'Z';
Karsten Hopp 4e1a0b
- 		else
Karsten Hopp 4e1a0b
- 		    firstdigit = 'z';
Karsten Hopp 4e1a0b
  	    }
Karsten Hopp 4e1a0b
  	    else
Karsten Hopp 4e1a0b
  #ifdef EBCDIC
Karsten Hopp 4e1a0b
! 		firstdigit = EBCDIC_CHAR_ADD(firstdigit, Prenum1);
Karsten Hopp 4e1a0b
  #else
Karsten Hopp 4e1a0b
! 		firstdigit += Prenum1;
Karsten Hopp 4e1a0b
  #endif
Karsten Hopp 4e1a0b
  	}
Karsten Hopp 4e1a0b
! 	curwin->w_cursor.col = col;
Karsten Hopp 4e1a0b
! 	(void)del_char(FALSE);
Karsten Hopp 4e1a0b
! 	ins_char(firstdigit);
Karsten Hopp 4e1a0b
!     }
Karsten Hopp 4e1a0b
!     else
Karsten Hopp 4e1a0b
!     {
Karsten Hopp 4e1a0b
! 	negative = FALSE;
Karsten Hopp 4e1a0b
! 	if (col > 0 && ptr[col - 1] == '-')	    /* negative number */
Karsten Hopp 4e1a0b
  	{
Karsten Hopp 4e1a0b
! 	    --col;
Karsten Hopp 4e1a0b
! 	    negative = TRUE;
Karsten Hopp 4e1a0b
! 	}
Karsten Hopp 4e1a0b
  
Karsten Hopp 4e1a0b
! 	/* get the number value (unsigned) */
Karsten Hopp 4e1a0b
! 	vim_str2nr(ptr + col, &hex, &length, dooct, dohex, NULL, &n);
Karsten Hopp 4e1a0b
  
Karsten Hopp 4e1a0b
! 	/* ignore leading '-' for hex and octal numbers */
Karsten Hopp 4e1a0b
! 	if (hex && negative)
Karsten Hopp 4e1a0b
! 	{
Karsten Hopp 4e1a0b
! 	    ++col;
Karsten Hopp 4e1a0b
! 	    --length;
Karsten Hopp 4e1a0b
! 	    negative = FALSE;
Karsten Hopp 4e1a0b
! 	}
Karsten Hopp 4e1a0b
  
Karsten Hopp 4e1a0b
! 	/* add or subtract */
Karsten Hopp 4e1a0b
! 	subtract = FALSE;
Karsten Hopp 4e1a0b
! 	if (command == Ctrl_X)
Karsten Hopp 4e1a0b
! 	    subtract ^= TRUE;
Karsten Hopp 4e1a0b
! 	if (negative)
Karsten Hopp 4e1a0b
! 	    subtract ^= TRUE;
Karsten Hopp 4e1a0b
! 
Karsten Hopp 4e1a0b
! 	oldn = n;
Karsten Hopp 4e1a0b
! 	if (subtract)
Karsten Hopp 4e1a0b
! 	    n -= (unsigned long)Prenum1;
Karsten Hopp 4e1a0b
! 	else
Karsten Hopp 4e1a0b
! 	    n += (unsigned long)Prenum1;
Karsten Hopp 4e1a0b
  
Karsten Hopp 4e1a0b
! 	/* handle wraparound for decimal numbers */
Karsten Hopp 4e1a0b
! 	if (!hex)
Karsten Hopp 4e1a0b
! 	{
Karsten Hopp 4e1a0b
  	    if (subtract)
Karsten Hopp 4e1a0b
  	    {
Karsten Hopp 4e1a0b
! 		if (n > oldn)
Karsten Hopp 4e1a0b
  		{
Karsten Hopp 4e1a0b
! 		    n = 1 + (n ^ (unsigned long)-1);
Karsten Hopp 4e1a0b
! 		    negative ^= TRUE;
Karsten Hopp 4e1a0b
  		}
Karsten Hopp 4e1a0b
  	    }
Karsten Hopp 4e1a0b
! 	    else /* add */
Karsten Hopp 4e1a0b
  	    {
Karsten Hopp 4e1a0b
! 		if (n < oldn)
Karsten Hopp 4e1a0b
  		{
Karsten Hopp 4e1a0b
! 		    n = (n ^ (unsigned long)-1);
Karsten Hopp 4e1a0b
! 		    negative ^= TRUE;
Karsten Hopp 4e1a0b
  		}
Karsten Hopp 4e1a0b
  	    }
Karsten Hopp 4e1a0b
- 	    if (n == 0)
Karsten Hopp 4e1a0b
- 		negative = FALSE;
Karsten Hopp 4e1a0b
- 	}
Karsten Hopp 4e1a0b
  
Karsten Hopp 4e1a0b
! 	/*
Karsten Hopp 4e1a0b
! 	 * Delete the old number.
Karsten Hopp 4e1a0b
! 	 */
Karsten Hopp 4e1a0b
! 	curwin->w_cursor.col = col;
Karsten Hopp 4e1a0b
! 	todel = length;
Karsten Hopp 4e1a0b
! 	c = gchar_cursor();
Karsten Hopp 4e1a0b
! 	/*
Karsten Hopp 4e1a0b
! 	 * Don't include the '-' in the length, only the length of the part
Karsten Hopp 4e1a0b
! 	 * after it is kept the same.
Karsten Hopp 4e1a0b
! 	 */
Karsten Hopp 4e1a0b
! 	if (c == '-')
Karsten Hopp 4e1a0b
! 	    --length;
Karsten Hopp 4e1a0b
! 	while (todel-- > 0)
Karsten Hopp 4e1a0b
! 	{
Karsten Hopp 4e1a0b
! 	    if (c < 0x100 && isalpha(c))
Karsten Hopp 4e1a0b
  	    {
Karsten Hopp 4e1a0b
! 		if (isupper(c))
Karsten Hopp 4e1a0b
! 		    hexupper = TRUE;
Karsten Hopp 4e1a0b
! 		else
Karsten Hopp 4e1a0b
! 		    hexupper = FALSE;
Karsten Hopp 4e1a0b
  	    }
Karsten Hopp 4e1a0b
- 	    /* del_char() will mark line needing displaying */
Karsten Hopp 4e1a0b
- 	    (void)del_char(FALSE);
Karsten Hopp 4e1a0b
- 	    c = gchar_cursor();
Karsten Hopp 4e1a0b
- 	}
Karsten Hopp 4e1a0b
  
Karsten Hopp 4e1a0b
! 	/*
Karsten Hopp 4e1a0b
! 	 * Prepare the leading characters in buf1[].
Karsten Hopp 4e1a0b
! 	 * When there are many leading zeros it could be very long.  Allocate
Karsten Hopp 4e1a0b
! 	 * a bit too much.
Karsten Hopp 4e1a0b
! 	 */
Karsten Hopp 4e1a0b
! 	buf1 = alloc((unsigned)length + NUMBUFLEN);
Karsten Hopp 4e1a0b
! 	if (buf1 == NULL)
Karsten Hopp 4e1a0b
! 	    return FAIL;
Karsten Hopp 4e1a0b
! 	ptr = buf1;
Karsten Hopp 4e1a0b
! 	if (negative)
Karsten Hopp 4e1a0b
! 	{
Karsten Hopp 4e1a0b
! 	    *ptr++ = '-';
Karsten Hopp 4e1a0b
! 	}
Karsten Hopp 4e1a0b
! 	if (hex)
Karsten Hopp 4e1a0b
! 	{
Karsten Hopp 4e1a0b
! 	    *ptr++ = '0';
Karsten Hopp 4e1a0b
! 	    --length;
Karsten Hopp 4e1a0b
! 	}
Karsten Hopp 4e1a0b
! 	if (hex == 'x' || hex == 'X')
Karsten Hopp 4e1a0b
! 	{
Karsten Hopp 4e1a0b
! 	    *ptr++ = hex;
Karsten Hopp 4e1a0b
! 	    --length;
Karsten Hopp 4e1a0b
! 	}
Karsten Hopp 4e1a0b
  
Karsten Hopp 4e1a0b
! 	/*
Karsten Hopp 4e1a0b
! 	 * Put the number characters in buf2[].
Karsten Hopp 4e1a0b
! 	 */
Karsten Hopp 4e1a0b
! 	if (hex == 0)
Karsten Hopp 4e1a0b
! 	    sprintf((char *)buf2, "%lu", n);
Karsten Hopp 4e1a0b
! 	else if (hex == '0')
Karsten Hopp 4e1a0b
! 	    sprintf((char *)buf2, "%lo", n);
Karsten Hopp 4e1a0b
! 	else if (hex && hexupper)
Karsten Hopp 4e1a0b
! 	    sprintf((char *)buf2, "%lX", n);
Karsten Hopp 4e1a0b
! 	else
Karsten Hopp 4e1a0b
! 	    sprintf((char *)buf2, "%lx", n);
Karsten Hopp 4e1a0b
! 	length -= (int)STRLEN(buf2);
Karsten Hopp 4e1a0b
  
Karsten Hopp 4e1a0b
! 	/*
Karsten Hopp 4e1a0b
! 	 * Adjust number of zeros to the new number of digits, so the
Karsten Hopp 4e1a0b
! 	 * total length of the number remains the same.
Karsten Hopp 4e1a0b
! 	 * Don't do this when
Karsten Hopp 4e1a0b
! 	 * the result may look like an octal number.
Karsten Hopp 4e1a0b
! 	 */
Karsten Hopp 4e1a0b
! 	if (firstdigit == '0' && !(dooct && hex == 0))
Karsten Hopp 4e1a0b
! 	    while (length-- > 0)
Karsten Hopp 4e1a0b
! 		*ptr++ = '0';
Karsten Hopp 4e1a0b
! 	*ptr = NUL;
Karsten Hopp 4e1a0b
! 	STRCAT(buf1, buf2);
Karsten Hopp 4e1a0b
! 	ins_str(buf1);		/* insert the new number */
Karsten Hopp 4e1a0b
! 	vim_free(buf1);
Karsten Hopp 4e1a0b
!     }
Karsten Hopp 4e1a0b
!     --curwin->w_cursor.col;
Karsten Hopp 4e1a0b
!     curwin->w_set_curswant = TRUE;
Karsten Hopp 4e1a0b
  #ifdef FEAT_RIGHTLEFT
Karsten Hopp 4e1a0b
!     ptr = ml_get_buf(curbuf, curwin->w_cursor.lnum, TRUE);
Karsten Hopp 4e1a0b
!     RLADDSUBFIX(ptr);
Karsten Hopp 4e1a0b
  #endif
Karsten Hopp 4e1a0b
      return OK;
Karsten Hopp 4e1a0b
  }
Karsten Hopp 4e1a0b
  
Karsten Hopp 4e1a0b
--- 5396,5697 ----
Karsten Hopp 4e1a0b
      int		dooct;
Karsten Hopp 4e1a0b
      int		doalp;
Karsten Hopp 4e1a0b
      int		firstdigit;
Karsten Hopp 4e1a0b
      int		subtract;
Karsten Hopp 4e1a0b
+     int		negative = FALSE;
Karsten Hopp 4e1a0b
+     int		visual = VIsual_active;
Karsten Hopp 4e1a0b
+     int		i;
Karsten Hopp 4e1a0b
+     int		lnum = curwin->w_cursor.lnum;
Karsten Hopp 4e1a0b
+     int		lnume = curwin->w_cursor.lnum;
Karsten Hopp 4e1a0b
  
Karsten Hopp 4e1a0b
      dohex = (vim_strchr(curbuf->b_p_nf, 'x') != NULL);	/* "heX" */
Karsten Hopp 4e1a0b
      dooct = (vim_strchr(curbuf->b_p_nf, 'o') != NULL);	/* "Octal" */
Karsten Hopp 4e1a0b
      doalp = (vim_strchr(curbuf->b_p_nf, 'p') != NULL);	/* "alPha" */
Karsten Hopp 4e1a0b
  
Karsten Hopp 4e1a0b
      /*
Karsten Hopp 4e1a0b
       * First check if we are on a hexadecimal number, after the "0x".
Karsten Hopp 4e1a0b
       */
Karsten Hopp 4e1a0b
      col = curwin->w_cursor.col;
Karsten Hopp 4e1a0b
!     if (VIsual_active)
Karsten Hopp 4e1a0b
      {
Karsten Hopp 4e1a0b
! 	if (lt(curwin->w_cursor, VIsual))
Karsten Hopp 4e1a0b
! 	{
Karsten Hopp 4e1a0b
! 	    pos_T t;
Karsten Hopp 4e1a0b
! 	    t = curwin->w_cursor;
Karsten Hopp 4e1a0b
! 	    curwin->w_cursor = VIsual;
Karsten Hopp 4e1a0b
! 	    VIsual = t;
Karsten Hopp 4e1a0b
! 	}
Karsten Hopp 4e1a0b
! 	if (VIsual_mode == 'V')
Karsten Hopp 4e1a0b
! 	    VIsual.col = 0;
Karsten Hopp 4e1a0b
! 
Karsten Hopp 4e1a0b
! 	ptr = ml_get(VIsual.lnum);
Karsten Hopp 4e1a0b
! 	RLADDSUBFIX(ptr);
Karsten Hopp 4e1a0b
! 
Karsten Hopp 4e1a0b
! 	/* store visual area for 'gv' */
Karsten Hopp 4e1a0b
! 	curbuf->b_visual.vi_start = VIsual;
Karsten Hopp 4e1a0b
! 	curbuf->b_visual.vi_end = curwin->w_cursor;
Karsten Hopp 4e1a0b
! 	curbuf->b_visual.vi_mode = VIsual_mode;
Karsten Hopp 4e1a0b
! 
Karsten Hopp 4e1a0b
! 	col = VIsual.col;
Karsten Hopp 4e1a0b
! 	lnum = VIsual.lnum;
Karsten Hopp 4e1a0b
! 	lnume = curwin->w_cursor.lnum;
Karsten Hopp 4e1a0b
! 	if (ptr[col] == '-')
Karsten Hopp 4e1a0b
! 	{
Karsten Hopp 4e1a0b
! 	    negative = TRUE;
Karsten Hopp 4e1a0b
! 	    col++;
Karsten Hopp 4e1a0b
! 	}
Karsten Hopp 4e1a0b
      }
Karsten Hopp 4e1a0b
      else
Karsten Hopp 4e1a0b
      {
Karsten Hopp 4e1a0b
! 	ptr = ml_get_curline();
Karsten Hopp 4e1a0b
! 	RLADDSUBFIX(ptr);
Karsten Hopp 4e1a0b
  
Karsten Hopp 4e1a0b
! 	if (dohex)
Karsten Hopp 4e1a0b
! 	    while (col > 0 && vim_isxdigit(ptr[col]))
Karsten Hopp 4e1a0b
! 		--col;
Karsten Hopp 4e1a0b
! 	if (       dohex
Karsten Hopp 4e1a0b
! 		&& col > 0
Karsten Hopp 4e1a0b
! 		&& (ptr[col] == 'X'
Karsten Hopp 4e1a0b
! 		    || ptr[col] == 'x')
Karsten Hopp 4e1a0b
! 		&& ptr[col - 1] == '0'
Karsten Hopp 4e1a0b
! 		&& vim_isxdigit(ptr[col + 1]))
Karsten Hopp 4e1a0b
! 	{
Karsten Hopp 4e1a0b
! 	    /* Found hexadecimal number, move to its start. */
Karsten Hopp 4e1a0b
  	    --col;
Karsten Hopp 4e1a0b
+ 	}
Karsten Hopp 4e1a0b
+ 	else
Karsten Hopp 4e1a0b
+ 	{
Karsten Hopp 4e1a0b
+ 	    /*
Karsten Hopp 4e1a0b
+ 	     * Search forward and then backward to find the start of number.
Karsten Hopp 4e1a0b
+ 	     */
Karsten Hopp 4e1a0b
+ 	    col = curwin->w_cursor.col;
Karsten Hopp 4e1a0b
+ 
Karsten Hopp 4e1a0b
+ 	    while (ptr[col] != NUL
Karsten Hopp 4e1a0b
+ 		    && !vim_isdigit(ptr[col])
Karsten Hopp 4e1a0b
+ 		    && !(doalp && ASCII_ISALPHA(ptr[col])))
Karsten Hopp 4e1a0b
+ 		++col;
Karsten Hopp 4e1a0b
+ 
Karsten Hopp 4e1a0b
+ 	    while (col > 0
Karsten Hopp 4e1a0b
+ 		    && vim_isdigit(ptr[col - 1])
Karsten Hopp 4e1a0b
+ 		    && !(doalp && ASCII_ISALPHA(ptr[col])))
Karsten Hopp 4e1a0b
+ 		--col;
Karsten Hopp 4e1a0b
+ 	}
Karsten Hopp 4e1a0b
      }
Karsten Hopp 4e1a0b
  
Karsten Hopp 4e1a0b
!     for (i = lnum; i <= lnume; i++)
Karsten Hopp 4e1a0b
      {
Karsten Hopp 4e1a0b
! 	curwin->w_cursor.lnum = i;
Karsten Hopp 4e1a0b
! 	ptr = ml_get_curline();
Karsten Hopp 4e1a0b
! 	RLADDSUBFIX(ptr);
Karsten Hopp 4e1a0b
! 	if ((int)STRLEN(ptr) <= col)
Karsten Hopp 4e1a0b
! 	    col = 0;
Karsten Hopp 4e1a0b
! 	/*
Karsten Hopp 4e1a0b
! 	 * If a number was found, and saving for undo works, replace the number.
Karsten Hopp 4e1a0b
! 	 */
Karsten Hopp 4e1a0b
! 	firstdigit = ptr[col];
Karsten Hopp 4e1a0b
! 	RLADDSUBFIX(ptr);
Karsten Hopp 4e1a0b
! 	if ((!VIM_ISDIGIT(firstdigit) && !(doalp && ASCII_ISALPHA(firstdigit)))
Karsten Hopp 4e1a0b
! 		|| u_save_cursor() != OK)
Karsten Hopp 4e1a0b
! 	{
Karsten Hopp 4e1a0b
! 	    if (lnum < lnume)
Karsten Hopp 4e1a0b
! 		/* Try again on next line */
Karsten Hopp 4e1a0b
! 		continue;
Karsten Hopp 4e1a0b
! 	    beep_flush();
Karsten Hopp 4e1a0b
! 	    return FAIL;
Karsten Hopp 4e1a0b
! 	}
Karsten Hopp 4e1a0b
  
Karsten Hopp 4e1a0b
! 	ptr = ml_get_curline();
Karsten Hopp 4e1a0b
! 	RLADDSUBFIX(ptr);
Karsten Hopp 4e1a0b
  
Karsten Hopp 4e1a0b
! 	if (doalp && ASCII_ISALPHA(firstdigit))
Karsten Hopp 4e1a0b
  	{
Karsten Hopp 4e1a0b
! 	    /* decrement or increment alphabetic character */
Karsten Hopp 4e1a0b
! 	    if (command == Ctrl_X)
Karsten Hopp 4e1a0b
  	    {
Karsten Hopp 4e1a0b
! 		if (CharOrd(firstdigit) < Prenum1)
Karsten Hopp 4e1a0b
! 		{
Karsten Hopp 4e1a0b
! 		    if (isupper(firstdigit))
Karsten Hopp 4e1a0b
! 			firstdigit = 'A';
Karsten Hopp 4e1a0b
! 		    else
Karsten Hopp 4e1a0b
! 			firstdigit = 'a';
Karsten Hopp 4e1a0b
! 		}
Karsten Hopp 4e1a0b
  		else
Karsten Hopp 4e1a0b
  #ifdef EBCDIC
Karsten Hopp 4e1a0b
! 		    firstdigit = EBCDIC_CHAR_ADD(firstdigit, -Prenum1);
Karsten Hopp 4e1a0b
  #else
Karsten Hopp 4e1a0b
! 		    firstdigit -= Prenum1;
Karsten Hopp 4e1a0b
  #endif
Karsten Hopp 4e1a0b
  	    }
Karsten Hopp 4e1a0b
  	    else
Karsten Hopp 4e1a0b
+ 	    {
Karsten Hopp 4e1a0b
+ 		if (26 - CharOrd(firstdigit) - 1 < Prenum1)
Karsten Hopp 4e1a0b
+ 		{
Karsten Hopp 4e1a0b
+ 		    if (isupper(firstdigit))
Karsten Hopp 4e1a0b
+ 			firstdigit = 'Z';
Karsten Hopp 4e1a0b
+ 		    else
Karsten Hopp 4e1a0b
+ 			firstdigit = 'z';
Karsten Hopp 4e1a0b
+ 		}
Karsten Hopp 4e1a0b
+ 		else
Karsten Hopp 4e1a0b
  #ifdef EBCDIC
Karsten Hopp 4e1a0b
! 		    firstdigit = EBCDIC_CHAR_ADD(firstdigit, Prenum1);
Karsten Hopp 4e1a0b
  #else
Karsten Hopp 4e1a0b
! 		    firstdigit += Prenum1;
Karsten Hopp 4e1a0b
  #endif
Karsten Hopp 4e1a0b
+ 	    }
Karsten Hopp 4e1a0b
+ 	    curwin->w_cursor.col = col;
Karsten Hopp 4e1a0b
+ 	    (void)del_char(FALSE);
Karsten Hopp 4e1a0b
+ 	    ins_char(firstdigit);
Karsten Hopp 4e1a0b
  	}
Karsten Hopp 4e1a0b
! 	else
Karsten Hopp 4e1a0b
  	{
Karsten Hopp 4e1a0b
! 	    if (col > 0 && ptr[col - 1] == '-' && !visual)
Karsten Hopp 4e1a0b
! 	    {
Karsten Hopp 4e1a0b
! 		/* negative number */
Karsten Hopp 4e1a0b
! 		--col;
Karsten Hopp 4e1a0b
! 		negative = TRUE;
Karsten Hopp 4e1a0b
! 	    }
Karsten Hopp 4e1a0b
  
Karsten Hopp 4e1a0b
! 	    /* get the number value (unsigned) */
Karsten Hopp 4e1a0b
! 	    vim_str2nr(ptr + col, &hex, &length, dooct, dohex, NULL, &n);
Karsten Hopp 4e1a0b
  
Karsten Hopp 4e1a0b
! 	    /* ignore leading '-' for hex and octal numbers */
Karsten Hopp 4e1a0b
! 	    if (hex && negative)
Karsten Hopp 4e1a0b
! 	    {
Karsten Hopp 4e1a0b
! 		++col;
Karsten Hopp 4e1a0b
! 		--length;
Karsten Hopp 4e1a0b
! 		negative = FALSE;
Karsten Hopp 4e1a0b
! 	    }
Karsten Hopp 4e1a0b
  
Karsten Hopp 4e1a0b
! 	    /* add or subtract */
Karsten Hopp 4e1a0b
! 	    subtract = FALSE;
Karsten Hopp 4e1a0b
! 	    if (command == Ctrl_X)
Karsten Hopp 4e1a0b
! 		subtract ^= TRUE;
Karsten Hopp 4e1a0b
! 	    if (negative)
Karsten Hopp 4e1a0b
! 		subtract ^= TRUE;
Karsten Hopp 4e1a0b
  
Karsten Hopp 4e1a0b
! 	    oldn = n;
Karsten Hopp 4e1a0b
  	    if (subtract)
Karsten Hopp 4e1a0b
+ 		n -= (unsigned long)Prenum1;
Karsten Hopp 4e1a0b
+ 	    else
Karsten Hopp 4e1a0b
+ 		n += (unsigned long)Prenum1;
Karsten Hopp 4e1a0b
+ 
Karsten Hopp 4e1a0b
+ 	    /* handle wraparound for decimal numbers */
Karsten Hopp 4e1a0b
+ 	    if (!hex)
Karsten Hopp 4e1a0b
  	    {
Karsten Hopp 4e1a0b
! 		if (subtract)
Karsten Hopp 4e1a0b
! 		{
Karsten Hopp 4e1a0b
! 		    if (n > oldn)
Karsten Hopp 4e1a0b
! 		    {
Karsten Hopp 4e1a0b
! 			n = 1 + (n ^ (unsigned long)-1);
Karsten Hopp 4e1a0b
! 			negative ^= TRUE;
Karsten Hopp 4e1a0b
! 		    }
Karsten Hopp 4e1a0b
! 		}
Karsten Hopp 4e1a0b
! 		else
Karsten Hopp 4e1a0b
  		{
Karsten Hopp 4e1a0b
! 		    /* add */
Karsten Hopp 4e1a0b
! 		    if (n < oldn)
Karsten Hopp 4e1a0b
! 		    {
Karsten Hopp 4e1a0b
! 			n = (n ^ (unsigned long)-1);
Karsten Hopp 4e1a0b
! 			negative ^= TRUE;
Karsten Hopp 4e1a0b
! 		    }
Karsten Hopp 4e1a0b
  		}
Karsten Hopp 4e1a0b
+ 		if (n == 0)
Karsten Hopp 4e1a0b
+ 		    negative = FALSE;
Karsten Hopp 4e1a0b
  	    }
Karsten Hopp 4e1a0b
! 
Karsten Hopp 4e1a0b
! 	    /*
Karsten Hopp 4e1a0b
! 	     * Delete the old number.
Karsten Hopp 4e1a0b
! 	     */
Karsten Hopp 4e1a0b
! 	    curwin->w_cursor.col = col;
Karsten Hopp 4e1a0b
! 	    todel = length;
Karsten Hopp 4e1a0b
! 	    c = gchar_cursor();
Karsten Hopp 4e1a0b
! 
Karsten Hopp 4e1a0b
! 	    /*
Karsten Hopp 4e1a0b
! 	     * Don't include the '-' in the length, only the length of the
Karsten Hopp 4e1a0b
! 	     * part after it is kept the same.
Karsten Hopp 4e1a0b
! 	     */
Karsten Hopp 4e1a0b
! 	    if (c == '-')
Karsten Hopp 4e1a0b
! 		--length;
Karsten Hopp 4e1a0b
! 	    while (todel-- > 0)
Karsten Hopp 4e1a0b
  	    {
Karsten Hopp 4e1a0b
! 		if (c < 0x100 && isalpha(c))
Karsten Hopp 4e1a0b
  		{
Karsten Hopp 4e1a0b
! 		    if (isupper(c))
Karsten Hopp 4e1a0b
! 			hexupper = TRUE;
Karsten Hopp 4e1a0b
! 		    else
Karsten Hopp 4e1a0b
! 			hexupper = FALSE;
Karsten Hopp 4e1a0b
  		}
Karsten Hopp 4e1a0b
+ 		/* del_char() will mark line needing displaying */
Karsten Hopp 4e1a0b
+ 		(void)del_char(FALSE);
Karsten Hopp 4e1a0b
+ 		c = gchar_cursor();
Karsten Hopp 4e1a0b
  	    }
Karsten Hopp 4e1a0b
  
Karsten Hopp 4e1a0b
! 	    /*
Karsten Hopp 4e1a0b
! 	     * Prepare the leading characters in buf1[].
Karsten Hopp 4e1a0b
! 	     * When there are many leading zeros it could be very long.
Karsten Hopp 4e1a0b
! 	     * Allocate a bit too much.
Karsten Hopp 4e1a0b
! 	     */
Karsten Hopp 4e1a0b
! 	    buf1 = alloc((unsigned)length + NUMBUFLEN);
Karsten Hopp 4e1a0b
! 	    if (buf1 == NULL)
Karsten Hopp 4e1a0b
! 		return FAIL;
Karsten Hopp 4e1a0b
! 	    ptr = buf1;
Karsten Hopp 4e1a0b
! 	    /* do not add leading '-' for visual mode */
Karsten Hopp 4e1a0b
! 	    if (negative && !visual)
Karsten Hopp 4e1a0b
  	    {
Karsten Hopp 4e1a0b
! 		*ptr++ = '-';
Karsten Hopp 4e1a0b
! 	    }
Karsten Hopp 4e1a0b
! 	    if (hex)
Karsten Hopp 4e1a0b
! 	    {
Karsten Hopp 4e1a0b
! 		*ptr++ = '0';
Karsten Hopp 4e1a0b
! 		--length;
Karsten Hopp 4e1a0b
! 	    }
Karsten Hopp 4e1a0b
! 	    if (hex == 'x' || hex == 'X')
Karsten Hopp 4e1a0b
! 	    {
Karsten Hopp 4e1a0b
! 		*ptr++ = hex;
Karsten Hopp 4e1a0b
! 		--length;
Karsten Hopp 4e1a0b
  	    }
Karsten Hopp 4e1a0b
  
Karsten Hopp 4e1a0b
! 	    /*
Karsten Hopp 4e1a0b
! 	     * Put the number characters in buf2[].
Karsten Hopp 4e1a0b
! 	     */
Karsten Hopp 4e1a0b
! 	    if (hex == 0)
Karsten Hopp 4e1a0b
! 		sprintf((char *)buf2, "%lu", n + offset);
Karsten Hopp 4e1a0b
! 	    else if (hex == '0')
Karsten Hopp 4e1a0b
! 		sprintf((char *)buf2, "%lo", n + offset);
Karsten Hopp 4e1a0b
! 	    else if (hex && hexupper)
Karsten Hopp 4e1a0b
! 		sprintf((char *)buf2, "%lX", n + offset);
Karsten Hopp 4e1a0b
! 	    else
Karsten Hopp 4e1a0b
! 		sprintf((char *)buf2, "%lx", n + offset);
Karsten Hopp 4e1a0b
! 	    length -= (int)STRLEN(buf2);
Karsten Hopp 4e1a0b
  
Karsten Hopp 4e1a0b
! 	    if (g_cmd)
Karsten Hopp 4e1a0b
! 	    {
Karsten Hopp 4e1a0b
! 		if (subtract)
Karsten Hopp 4e1a0b
! 		    offset -= (unsigned long)Prenum1;
Karsten Hopp 4e1a0b
! 		else
Karsten Hopp 4e1a0b
! 		    offset += (unsigned long)Prenum1;
Karsten Hopp 4e1a0b
! 	    }
Karsten Hopp 4e1a0b
  
Karsten Hopp 4e1a0b
! 	    /*
Karsten Hopp 4e1a0b
! 	     * Adjust number of zeros to the new number of digits, so the
Karsten Hopp 4e1a0b
! 	     * total length of the number remains the same.
Karsten Hopp 4e1a0b
! 	     * Don't do this when
Karsten Hopp 4e1a0b
! 	     * the result may look like an octal number.
Karsten Hopp 4e1a0b
! 	     */
Karsten Hopp 4e1a0b
! 	    if (firstdigit == '0' && !(dooct && hex == 0))
Karsten Hopp 4e1a0b
! 		while (length-- > 0)
Karsten Hopp 4e1a0b
! 		    *ptr++ = '0';
Karsten Hopp 4e1a0b
! 	    *ptr = NUL;
Karsten Hopp 4e1a0b
! 	    STRCAT(buf1, buf2);
Karsten Hopp 4e1a0b
! 	    ins_str(buf1);		/* insert the new number */
Karsten Hopp 4e1a0b
! 	    vim_free(buf1);
Karsten Hopp 4e1a0b
! 	}
Karsten Hopp 4e1a0b
! 	--curwin->w_cursor.col;
Karsten Hopp 4e1a0b
! 	curwin->w_set_curswant = TRUE;
Karsten Hopp 4e1a0b
  #ifdef FEAT_RIGHTLEFT
Karsten Hopp 4e1a0b
! 	ptr = ml_get_buf(curbuf, curwin->w_cursor.lnum, TRUE);
Karsten Hopp 4e1a0b
! 	RLADDSUBFIX(ptr);
Karsten Hopp 4e1a0b
  #endif
Karsten Hopp 4e1a0b
+     }
Karsten Hopp 4e1a0b
      return OK;
Karsten Hopp 4e1a0b
  }
Karsten Hopp 4e1a0b
  
Karsten Hopp 4e1a0b
*** ../vim-7.4.753/src/proto/ops.pro	2014-12-17 14:36:10.363090985 +0100
Karsten Hopp 4e1a0b
--- src/proto/ops.pro	2015-06-25 13:38:28.429205490 +0200
Karsten Hopp 4e1a0b
***************
Karsten Hopp 4e1a0b
*** 43,49 ****
Karsten Hopp 4e1a0b
  int fex_format __ARGS((linenr_T lnum, long count, int c));
Karsten Hopp 4e1a0b
  void format_lines __ARGS((linenr_T line_count, int avoid_fex));
Karsten Hopp 4e1a0b
  int paragraph_start __ARGS((linenr_T lnum));
Karsten Hopp 4e1a0b
! int do_addsub __ARGS((int command, linenr_T Prenum1));
Karsten Hopp 4e1a0b
  int read_viminfo_register __ARGS((vir_T *virp, int force));
Karsten Hopp 4e1a0b
  void write_viminfo_registers __ARGS((FILE *fp));
Karsten Hopp 4e1a0b
  void x11_export_final_selection __ARGS((void));
Karsten Hopp 4e1a0b
--- 43,49 ----
Karsten Hopp 4e1a0b
  int fex_format __ARGS((linenr_T lnum, long count, int c));
Karsten Hopp 4e1a0b
  void format_lines __ARGS((linenr_T line_count, int avoid_fex));
Karsten Hopp 4e1a0b
  int paragraph_start __ARGS((linenr_T lnum));
Karsten Hopp 4e1a0b
! int do_addsub __ARGS((int command, linenr_T Prenum1, int g_cmd));
Karsten Hopp 4e1a0b
  int read_viminfo_register __ARGS((vir_T *virp, int force));
Karsten Hopp 4e1a0b
  void write_viminfo_registers __ARGS((FILE *fp));
Karsten Hopp 4e1a0b
  void x11_export_final_selection __ARGS((void));
Karsten Hopp 4e1a0b
*** ../vim-7.4.753/src/testdir/Make_amiga.mak	2015-06-19 15:45:13.005889121 +0200
Karsten Hopp 4e1a0b
--- src/testdir/Make_amiga.mak	2015-06-25 13:45:32.340769261 +0200
Karsten Hopp 4e1a0b
***************
Karsten Hopp 4e1a0b
*** 45,50 ****
Karsten Hopp 4e1a0b
--- 45,51 ----
Karsten Hopp 4e1a0b
  		test_command_count.out \
Karsten Hopp 4e1a0b
  		test_erasebackword.out \
Karsten Hopp 4e1a0b
  		test_eval.out \
Karsten Hopp 4e1a0b
+ 		test_increment.out \
Karsten Hopp 4e1a0b
  		test_insertcount.out \
Karsten Hopp 4e1a0b
  		test_listchars.out \
Karsten Hopp 4e1a0b
  		test_listlbr.out \
Karsten Hopp 4e1a0b
***************
Karsten Hopp 4e1a0b
*** 192,197 ****
Karsten Hopp 4e1a0b
--- 193,199 ----
Karsten Hopp 4e1a0b
  test_command_count.out: test_command_count.in
Karsten Hopp 4e1a0b
  test_erasebackword.out: test_erasebackword.in
Karsten Hopp 4e1a0b
  test_eval.out: test_eval.in
Karsten Hopp 4e1a0b
+ test_increment.out: test_increment.in
Karsten Hopp 4e1a0b
  test_insertcount.out: test_insertcount.in
Karsten Hopp 4e1a0b
  test_listchars.out: test_listchars.in
Karsten Hopp 4e1a0b
  test_listlbr.out: test_listlbr.in
Karsten Hopp 4e1a0b
*** ../vim-7.4.753/src/testdir/Make_dos.mak	2015-06-19 15:45:13.005889121 +0200
Karsten Hopp 4e1a0b
--- src/testdir/Make_dos.mak	2015-06-25 13:38:28.429205490 +0200
Karsten Hopp 4e1a0b
***************
Karsten Hopp 4e1a0b
*** 44,49 ****
Karsten Hopp 4e1a0b
--- 44,50 ----
Karsten Hopp 4e1a0b
  		test_command_count.out \
Karsten Hopp 4e1a0b
  		test_erasebackword.out \
Karsten Hopp 4e1a0b
  		test_eval.out \
Karsten Hopp 4e1a0b
+ 		test_increment.out \
Karsten Hopp 4e1a0b
  		test_insertcount.out \
Karsten Hopp 4e1a0b
  		test_listchars.out \
Karsten Hopp 4e1a0b
  		test_listlbr.out \
Karsten Hopp 4e1a0b
*** ../vim-7.4.753/src/testdir/Make_ming.mak	2015-06-19 15:45:13.005889121 +0200
Karsten Hopp 4e1a0b
--- src/testdir/Make_ming.mak	2015-06-25 13:38:28.429205490 +0200
Karsten Hopp 4e1a0b
***************
Karsten Hopp 4e1a0b
*** 66,71 ****
Karsten Hopp 4e1a0b
--- 66,72 ----
Karsten Hopp 4e1a0b
  		test_command_count.out \
Karsten Hopp 4e1a0b
  		test_erasebackword.out \
Karsten Hopp 4e1a0b
  		test_eval.out \
Karsten Hopp 4e1a0b
+ 		test_increment.out \
Karsten Hopp 4e1a0b
  		test_insertcount.out \
Karsten Hopp 4e1a0b
  		test_listchars.out \
Karsten Hopp 4e1a0b
  		test_listlbr.out \
Karsten Hopp 4e1a0b
*** ../vim-7.4.753/src/testdir/Make_os2.mak	2015-06-19 15:45:13.005889121 +0200
Karsten Hopp 4e1a0b
--- src/testdir/Make_os2.mak	2015-06-25 13:38:28.429205490 +0200
Karsten Hopp 4e1a0b
***************
Karsten Hopp 4e1a0b
*** 46,51 ****
Karsten Hopp 4e1a0b
--- 46,52 ----
Karsten Hopp 4e1a0b
  		test_command_count.out \
Karsten Hopp 4e1a0b
  		test_erasebackword.out \
Karsten Hopp 4e1a0b
  		test_eval.out \
Karsten Hopp 4e1a0b
+ 		test_increment.out \
Karsten Hopp 4e1a0b
  		test_insertcount.out \
Karsten Hopp 4e1a0b
  		test_listchars.out \
Karsten Hopp 4e1a0b
  		test_listlbr.out \
Karsten Hopp 4e1a0b
*** ../vim-7.4.753/src/testdir/Make_vms.mms	2015-06-19 15:45:13.005889121 +0200
Karsten Hopp 4e1a0b
--- src/testdir/Make_vms.mms	2015-06-25 13:38:28.429205490 +0200
Karsten Hopp 4e1a0b
***************
Karsten Hopp 4e1a0b
*** 105,110 ****
Karsten Hopp 4e1a0b
--- 105,111 ----
Karsten Hopp 4e1a0b
  	 test_command_count.out \
Karsten Hopp 4e1a0b
  	 test_erasebackword.out \
Karsten Hopp 4e1a0b
  	 test_eval.out \
Karsten Hopp 4e1a0b
+ 	 test_increment.out \
Karsten Hopp 4e1a0b
  	 test_insertcount.out \
Karsten Hopp 4e1a0b
  	 test_listchars.out \
Karsten Hopp 4e1a0b
  	 test_listlbr.out \
Karsten Hopp 4e1a0b
*** ../vim-7.4.753/src/testdir/Makefile	2015-06-19 15:45:13.005889121 +0200
Karsten Hopp 4e1a0b
--- src/testdir/Makefile	2015-06-25 13:38:28.429205490 +0200
Karsten Hopp 4e1a0b
***************
Karsten Hopp 4e1a0b
*** 42,47 ****
Karsten Hopp 4e1a0b
--- 42,48 ----
Karsten Hopp 4e1a0b
  		test_command_count.out \
Karsten Hopp 4e1a0b
  		test_erasebackword.out \
Karsten Hopp 4e1a0b
  		test_eval.out \
Karsten Hopp 4e1a0b
+ 		test_increment.out \
Karsten Hopp 4e1a0b
  		test_insertcount.out \
Karsten Hopp 4e1a0b
  		test_listchars.out \
Karsten Hopp 4e1a0b
  		test_listlbr.out \
Karsten Hopp 4e1a0b
*** ../vim-7.4.753/src/testdir/test_increment.in	2015-06-25 13:56:12.046135151 +0200
Karsten Hopp 4e1a0b
--- src/testdir/test_increment.in	2015-06-25 13:38:28.429205490 +0200
Karsten Hopp 4e1a0b
***************
Karsten Hopp 4e1a0b
*** 0 ****
Karsten Hopp 4e1a0b
--- 1,143 ----
Karsten Hopp 4e1a0b
+ Tests for using Ctrl-A/Ctrl-X on visual selections
Karsten Hopp 4e1a0b
+ 
Karsten Hopp 4e1a0b
+ Test cases
Karsten Hopp 4e1a0b
+ ==========
Karsten Hopp 4e1a0b
+ 
Karsten Hopp 4e1a0b
+ 1) Ctrl-A on visually selected number
Karsten Hopp 4e1a0b
+ Text:
Karsten Hopp 4e1a0b
+ foobar-10
Karsten Hopp 4e1a0b
+     1)    Ctrl-A on start of line:
Karsten Hopp 4e1a0b
+ 	foobar-9
Karsten Hopp 4e1a0b
+     2)    Ctrl-A on visually selected "-10":
Karsten Hopp 4e1a0b
+ 	foobar-9
Karsten Hopp 4e1a0b
+     3)    Ctrl-A on visually selected "10":
Karsten Hopp 4e1a0b
+ 	foobar-11
Karsten Hopp 4e1a0b
+     4)    Ctrl-X on visually selected "-10"
Karsten Hopp 4e1a0b
+ 	foobar-11
Karsten Hopp 4e1a0b
+     5)    Ctrl-X on visually selected "10"
Karsten Hopp 4e1a0b
+ 	foobar-9
Karsten Hopp 4e1a0b
+ 
Karsten Hopp 4e1a0b
+ 2) Ctrl-A on visually selected lines
Karsten Hopp 4e1a0b
+ Text:
Karsten Hopp 4e1a0b
+ 10
Karsten Hopp 4e1a0b
+ 20
Karsten Hopp 4e1a0b
+ 30
Karsten Hopp 4e1a0b
+ 40
Karsten Hopp 4e1a0b
+ 
Karsten Hopp 4e1a0b
+     1) Ctrl-A on visually selected lines:
Karsten Hopp 4e1a0b
+ 11
Karsten Hopp 4e1a0b
+ 21
Karsten Hopp 4e1a0b
+ 31
Karsten Hopp 4e1a0b
+ 41
Karsten Hopp 4e1a0b
+ 
Karsten Hopp 4e1a0b
+     2) Ctrl-X on visually selected lines:
Karsten Hopp 4e1a0b
+ 9
Karsten Hopp 4e1a0b
+ 19
Karsten Hopp 4e1a0b
+ 29
Karsten Hopp 4e1a0b
+ 39
Karsten Hopp 4e1a0b
+ 
Karsten Hopp 4e1a0b
+ 3) g Ctrl-A on visually selected lines, with non-numbers in between
Karsten Hopp 4e1a0b
+ Text:
Karsten Hopp 4e1a0b
+ 10
Karsten Hopp 4e1a0b
+ 
Karsten Hopp 4e1a0b
+ 20
Karsten Hopp 4e1a0b
+ 
Karsten Hopp 4e1a0b
+ 30
Karsten Hopp 4e1a0b
+ 
Karsten Hopp 4e1a0b
+ 40
Karsten Hopp 4e1a0b
+ 
Karsten Hopp 4e1a0b
+     1) 2 g Ctrl-A on visually selected lines:
Karsten Hopp 4e1a0b
+ 12
Karsten Hopp 4e1a0b
+ 
Karsten Hopp 4e1a0b
+ 24
Karsten Hopp 4e1a0b
+ 
Karsten Hopp 4e1a0b
+ 36
Karsten Hopp 4e1a0b
+ 
Karsten Hopp 4e1a0b
+ 48
Karsten Hopp 4e1a0b
+     2) 2 g Ctrl-X on visually selected lines
Karsten Hopp 4e1a0b
+ 8
Karsten Hopp 4e1a0b
+ 
Karsten Hopp 4e1a0b
+ 16
Karsten Hopp 4e1a0b
+ 
Karsten Hopp 4e1a0b
+ 24
Karsten Hopp 4e1a0b
+ 
Karsten Hopp 4e1a0b
+ 32
Karsten Hopp 4e1a0b
+ 
Karsten Hopp 4e1a0b
+ 4) Ctrl-A on non-number
Karsten Hopp 4e1a0b
+ Text:
Karsten Hopp 4e1a0b
+ foobar-10
Karsten Hopp 4e1a0b
+     1) visually select foobar:
Karsten Hopp 4e1a0b
+     foobar-10
Karsten Hopp 4e1a0b
+ 
Karsten Hopp 4e1a0b
+ STARTTEST
Karsten Hopp 4e1a0b
+ :so small.vim
Karsten Hopp 4e1a0b
+ 
Karsten Hopp 4e1a0b
+ :" Test 1
Karsten Hopp 4e1a0b
+ :/^S1=/+,/^E1=/-y a
Karsten Hopp 4e1a0b
+ :/^E1/+put a
Karsten Hopp 4e1a0b
+ ?:/^E1/+2put a
Karsten Hopp 4e1a0b
+ f-v$?:/^E1/+3put a
Karsten Hopp 4e1a0b
+ f1v$?:/^E1/+4put a
Karsten Hopp 4e1a0b
+ f-v$?:/^E1/+5put a
Karsten Hopp 4e1a0b
+ f1v$?
Karsten Hopp 4e1a0b
+ 
Karsten Hopp 4e1a0b
+ :" Test 22
Karsten Hopp 4e1a0b
+ :/^S2=/+,/^E2=/-y a
Karsten Hopp 4e1a0b
+ :/^E2/+put a
Karsten Hopp 4e1a0b
+ V3k$?:.+put a
Karsten Hopp 4e1a0b
+ V3k$?
Karsten Hopp 4e1a0b
+ 
Karsten Hopp 4e1a0b
+ :" Test 3
Karsten Hopp 4e1a0b
+ :/^S3=/+,/^E3=/-y a
Karsten Hopp 4e1a0b
+ :/^E3=/+put a
Karsten Hopp 4e1a0b
+ V6k2g?:.+put a
Karsten Hopp 4e1a0b
+ V6k2g?
Karsten Hopp 4e1a0b
+ 
Karsten Hopp 4e1a0b
+ :" Test 4
Karsten Hopp 4e1a0b
+ :/^S4=/+,/^E4=/-y a
Karsten Hopp 4e1a0b
+ :/^E4=/+put a
Karsten Hopp 4e1a0b
+ vf-?
Karsten Hopp 4e1a0b
+ 
Karsten Hopp 4e1a0b
+ :" Save the report
Karsten Hopp 4e1a0b
+ :/^# Test 1/,$w! test.out
Karsten Hopp 4e1a0b
+ :qa!
Karsten Hopp 4e1a0b
+ 
Karsten Hopp 4e1a0b
+ 
Karsten Hopp 4e1a0b
+ # Test 1
Karsten Hopp 4e1a0b
+ S1======
Karsten Hopp 4e1a0b
+ foobar-10
Karsten Hopp 4e1a0b
+ E1======
Karsten Hopp 4e1a0b
+ 
Karsten Hopp 4e1a0b
+ 
Karsten Hopp 4e1a0b
+ 
Karsten Hopp 4e1a0b
+ # Test 2
Karsten Hopp 4e1a0b
+ S2=====
Karsten Hopp 4e1a0b
+ 10
Karsten Hopp 4e1a0b
+ 20
Karsten Hopp 4e1a0b
+ 30
Karsten Hopp 4e1a0b
+ 40
Karsten Hopp 4e1a0b
+ E2=====
Karsten Hopp 4e1a0b
+ 
Karsten Hopp 4e1a0b
+ 
Karsten Hopp 4e1a0b
+ 
Karsten Hopp 4e1a0b
+ # Test 3
Karsten Hopp 4e1a0b
+ S3=====
Karsten Hopp 4e1a0b
+ 10
Karsten Hopp 4e1a0b
+ 
Karsten Hopp 4e1a0b
+ 20
Karsten Hopp 4e1a0b
+ 
Karsten Hopp 4e1a0b
+ 30
Karsten Hopp 4e1a0b
+ 
Karsten Hopp 4e1a0b
+ 40
Karsten Hopp 4e1a0b
+ E3=====
Karsten Hopp 4e1a0b
+ 
Karsten Hopp 4e1a0b
+ 
Karsten Hopp 4e1a0b
+ 
Karsten Hopp 4e1a0b
+ # Test 4
Karsten Hopp 4e1a0b
+ S4=====
Karsten Hopp 4e1a0b
+ foobar-10
Karsten Hopp 4e1a0b
+ E4=====
Karsten Hopp 4e1a0b
+ 
Karsten Hopp 4e1a0b
+ 
Karsten Hopp 4e1a0b
+ ENDTEST
Karsten Hopp 4e1a0b
+ 
Karsten Hopp 4e1a0b
*** ../vim-7.4.753/src/testdir/test_increment.ok	2015-06-25 13:56:12.050135109 +0200
Karsten Hopp 4e1a0b
--- src/testdir/test_increment.ok	2015-06-25 13:38:28.429205490 +0200
Karsten Hopp 4e1a0b
***************
Karsten Hopp 4e1a0b
*** 0 ****
Karsten Hopp 4e1a0b
--- 1,66 ----
Karsten Hopp 4e1a0b
+ # Test 1
Karsten Hopp 4e1a0b
+ S1======
Karsten Hopp 4e1a0b
+ foobar-10
Karsten Hopp 4e1a0b
+ E1======
Karsten Hopp 4e1a0b
+ 
Karsten Hopp 4e1a0b
+ foobar-9
Karsten Hopp 4e1a0b
+ foobar-9
Karsten Hopp 4e1a0b
+ foobar-11
Karsten Hopp 4e1a0b
+ foobar-11
Karsten Hopp 4e1a0b
+ foobar-9
Karsten Hopp 4e1a0b
+ 
Karsten Hopp 4e1a0b
+ 
Karsten Hopp 4e1a0b
+ # Test 2
Karsten Hopp 4e1a0b
+ S2=====
Karsten Hopp 4e1a0b
+ 10
Karsten Hopp 4e1a0b
+ 20
Karsten Hopp 4e1a0b
+ 30
Karsten Hopp 4e1a0b
+ 40
Karsten Hopp 4e1a0b
+ E2=====
Karsten Hopp 4e1a0b
+ 
Karsten Hopp 4e1a0b
+ 11
Karsten Hopp 4e1a0b
+ 21
Karsten Hopp 4e1a0b
+ 31
Karsten Hopp 4e1a0b
+ 41
Karsten Hopp 4e1a0b
+ 
Karsten Hopp 4e1a0b
+ 9
Karsten Hopp 4e1a0b
+ 19
Karsten Hopp 4e1a0b
+ 29
Karsten Hopp 4e1a0b
+ 39
Karsten Hopp 4e1a0b
+ 
Karsten Hopp 4e1a0b
+ # Test 3
Karsten Hopp 4e1a0b
+ S3=====
Karsten Hopp 4e1a0b
+ 10
Karsten Hopp 4e1a0b
+ 
Karsten Hopp 4e1a0b
+ 20
Karsten Hopp 4e1a0b
+ 
Karsten Hopp 4e1a0b
+ 30
Karsten Hopp 4e1a0b
+ 
Karsten Hopp 4e1a0b
+ 40
Karsten Hopp 4e1a0b
+ E3=====
Karsten Hopp 4e1a0b
+ 
Karsten Hopp 4e1a0b
+ 12
Karsten Hopp 4e1a0b
+ 
Karsten Hopp 4e1a0b
+ 24
Karsten Hopp 4e1a0b
+ 
Karsten Hopp 4e1a0b
+ 36
Karsten Hopp 4e1a0b
+ 
Karsten Hopp 4e1a0b
+ 48
Karsten Hopp 4e1a0b
+ 
Karsten Hopp 4e1a0b
+ 8
Karsten Hopp 4e1a0b
+ 
Karsten Hopp 4e1a0b
+ 16
Karsten Hopp 4e1a0b
+ 
Karsten Hopp 4e1a0b
+ 24
Karsten Hopp 4e1a0b
+ 
Karsten Hopp 4e1a0b
+ 32
Karsten Hopp 4e1a0b
+ 
Karsten Hopp 4e1a0b
+ # Test 4
Karsten Hopp 4e1a0b
+ S4=====
Karsten Hopp 4e1a0b
+ foobar-10
Karsten Hopp 4e1a0b
+ E4=====
Karsten Hopp 4e1a0b
+ 
Karsten Hopp 4e1a0b
+ foobar-10
Karsten Hopp 4e1a0b
+ 
Karsten Hopp 4e1a0b
+ ENDTEST
Karsten Hopp 4e1a0b
+ 
Karsten Hopp 4e1a0b
*** ../vim-7.4.753/src/version.c	2015-06-25 13:30:41.206095684 +0200
Karsten Hopp 4e1a0b
--- src/version.c	2015-06-25 13:38:07.853420831 +0200
Karsten Hopp 4e1a0b
***************
Karsten Hopp 4e1a0b
*** 743,744 ****
Karsten Hopp 4e1a0b
--- 743,746 ----
Karsten Hopp 4e1a0b
  {   /* Add new patch number below this line */
Karsten Hopp 4e1a0b
+ /**/
Karsten Hopp 4e1a0b
+     754,
Karsten Hopp 4e1a0b
  /**/
Karsten Hopp 4e1a0b
Karsten Hopp 4e1a0b
-- 
Karsten Hopp 4e1a0b
hundred-and-one symptoms of being an internet addict:
Karsten Hopp 4e1a0b
144. You eagerly await the update of the "Cool Site of the Day."
Karsten Hopp 4e1a0b
Karsten Hopp 4e1a0b
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp 4e1a0b
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp 4e1a0b
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp 4e1a0b
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///