jkunstle / rpms / vim

Forked from rpms/vim 3 years ago
Clone

Blame SOURCES/7.4.110

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