8b9a1c
To: vim_dev@googlegroups.com
8b9a1c
Subject: Patch 7.4.110
8b9a1c
Fcc: outbox
8b9a1c
From: Bram Moolenaar <Bram@moolenaar.net>
8b9a1c
Mime-Version: 1.0
8b9a1c
Content-Type: text/plain; charset=UTF-8
8b9a1c
Content-Transfer-Encoding: 8bit
8b9a1c
------------
8b9a1c
8b9a1c
Patch 7.4.110
8b9a1c
Problem:    "gUgn" cannot be repeeated. (Dimitar Dimitrov)
8b9a1c
Solution:   Don't put "gn" in a different order in the redo buffer.  Restore
8b9a1c
	    'wrapscan' when the pattern isn't found. (Christian Wellenbrock)
8b9a1c
Files:	    src/normal.c, src/search.c, src/test53.in, src/test53.ok
8b9a1c
8b9a1c
8b9a1c
*** ../vim-7.4.109/src/normal.c	2013-11-04 01:41:11.000000000 +0100
8b9a1c
--- src/normal.c	2013-11-28 19:02:45.000000000 +0100
8b9a1c
***************
8b9a1c
*** 962,972 ****
8b9a1c
  #ifdef FEAT_CMDL_INFO
8b9a1c
  	    need_flushbuf |= add_to_showcmd(ca.nchar);
8b9a1c
  #endif
8b9a1c
- 	    /* For "gn" from redo, need to get one more char to determine the
8b9a1c
- 	     * operator */
8b9a1c
  	    if (ca.nchar == 'r' || ca.nchar == '\'' || ca.nchar == '`'
8b9a1c
! 						       || ca.nchar == Ctrl_BSL
8b9a1c
! 		  || ((ca.nchar == 'n' || ca.nchar == 'N') && !stuff_empty()))
8b9a1c
  	    {
8b9a1c
  		cp = &ca.extra_char;	/* need to get a third character */
8b9a1c
  		if (ca.nchar != 'r')
8b9a1c
--- 962,969 ----
8b9a1c
  #ifdef FEAT_CMDL_INFO
8b9a1c
  	    need_flushbuf |= add_to_showcmd(ca.nchar);
8b9a1c
  #endif
8b9a1c
  	    if (ca.nchar == 'r' || ca.nchar == '\'' || ca.nchar == '`'
8b9a1c
! 						       || ca.nchar == Ctrl_BSL)
8b9a1c
  	    {
8b9a1c
  		cp = &ca.extra_char;	/* need to get a third character */
8b9a1c
  		if (ca.nchar != 'r')
8b9a1c
***************
8b9a1c
*** 1797,1806 ****
8b9a1c
  		 * otherwise it might be the second char of the operator. */
8b9a1c
  		if (cap->cmdchar == 'g' && (cap->nchar == 'n'
8b9a1c
  							|| cap->nchar == 'N'))
8b9a1c
! 		    /* "gn" and "gN" are a bit different */
8b9a1c
! 		    prep_redo(oap->regname, 0L, NUL, cap->cmdchar, cap->nchar,
8b9a1c
! 					get_op_char(oap->op_type),
8b9a1c
! 					get_extra_op_char(oap->op_type));
8b9a1c
  		else if (cap->cmdchar != ':')
8b9a1c
  		    prep_redo(oap->regname, 0L, NUL, 'v',
8b9a1c
  					get_op_char(oap->op_type),
8b9a1c
--- 1794,1802 ----
8b9a1c
  		 * otherwise it might be the second char of the operator. */
8b9a1c
  		if (cap->cmdchar == 'g' && (cap->nchar == 'n'
8b9a1c
  							|| cap->nchar == 'N'))
8b9a1c
! 		    prep_redo(oap->regname, cap->count0,
8b9a1c
! 			    get_op_char(oap->op_type), get_extra_op_char(oap->op_type),
8b9a1c
! 			    oap->motion_force, cap->cmdchar, cap->nchar);
8b9a1c
  		else if (cap->cmdchar != ':')
8b9a1c
  		    prep_redo(oap->regname, 0L, NUL, 'v',
8b9a1c
  					get_op_char(oap->op_type),
8b9a1c
*** ../vim-7.4.109/src/search.c	2013-11-08 04:30:06.000000000 +0100
8b9a1c
--- src/search.c	2013-11-28 19:05:16.000000000 +0100
8b9a1c
***************
8b9a1c
*** 4544,4550 ****
8b9a1c
      /* Is the pattern is zero-width? */
8b9a1c
      one_char = is_one_char(spats[last_idx].pat);
8b9a1c
      if (one_char == -1)
8b9a1c
! 	return FAIL;  /* invalid pattern */
8b9a1c
  
8b9a1c
      /*
8b9a1c
       * The trick is to first search backwards and then search forward again,
8b9a1c
--- 4544,4553 ----
8b9a1c
      /* Is the pattern is zero-width? */
8b9a1c
      one_char = is_one_char(spats[last_idx].pat);
8b9a1c
      if (one_char == -1)
8b9a1c
!     {
8b9a1c
! 	p_ws = old_p_ws;
8b9a1c
! 	return FAIL;  /* pattern not found */
8b9a1c
!     }
8b9a1c
  
8b9a1c
      /*
8b9a1c
       * The trick is to first search backwards and then search forward again,
8b9a1c
*** ../vim-7.4.109/src/version.c	2013-11-28 18:53:47.000000000 +0100
8b9a1c
--- src/version.c	2013-11-28 19:20:29.000000000 +0100
8b9a1c
***************
8b9a1c
*** 740,741 ****
8b9a1c
--- 740,743 ----
8b9a1c
  {   /* Add new patch number below this line */
8b9a1c
+ /**/
8b9a1c
+     110,
8b9a1c
  /**/
8b9a1c
8b9a1c
-- 
8b9a1c
hundred-and-one symptoms of being an internet addict:
8b9a1c
10. And even your night dreams are in HTML.
8b9a1c
8b9a1c
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
8b9a1c
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
8b9a1c
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
8b9a1c
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///