Blob Blame History Raw
To: vim_dev@googlegroups.com
Subject: Patch 7.3.673
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------

Patch 7.3.673
Problem:    Using "gN" while 'selection' is "exclusive" misses one character.
	    (Ben Fritz)
Solution:   Check the direction when compensating for exclusive selection.
	    (Christian Brabandt)
Files:	    src/search.c


*** ../vim-7.3.672/src/search.c	2012-09-05 12:16:39.000000000 +0200
--- src/search.c	2012-10-03 13:28:49.000000000 +0200
***************
*** 4650,4657 ****
      if (VIsual_active)
      {
  	redraw_curbuf_later(INVERTED);	/* update the inversion */
! 	if (*p_sel == 'e' && ltoreq(VIsual, curwin->w_cursor))
! 	    inc_cursor();
      }
  
  #ifdef FEAT_FOLDING
--- 4650,4664 ----
      if (VIsual_active)
      {
  	redraw_curbuf_later(INVERTED);	/* update the inversion */
! 	if (*p_sel == 'e')
! 	{
! 	    /* Correction for exclusive selection depends on the direction. */
! 	    if (forward && ltoreq(VIsual, curwin->w_cursor))
! 		inc_cursor();
! 	    else if (!forward && ltoreq(curwin->w_cursor, VIsual))
! 		inc(&VIsual);
! 	}
! 
      }
  
  #ifdef FEAT_FOLDING
*** ../vim-7.3.672/src/version.c	2012-09-21 14:00:05.000000000 +0200
--- src/version.c	2012-10-03 13:31:45.000000000 +0200
***************
*** 721,722 ****
--- 721,724 ----
  {   /* Add new patch number below this line */
+ /**/
+     673,
  /**/

-- 
You can be stopped by the police for biking over 65 miles per hour.
You are not allowed to walk across a street on your hands.
		[real standing laws in Connecticut, United States of America]

 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///