Karsten Hopp 8c54ba
To: vim_dev@googlegroups.com
Karsten Hopp 8c54ba
Subject: Patch 7.3.529
Karsten Hopp 8c54ba
Fcc: outbox
Karsten Hopp 8c54ba
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp 8c54ba
Mime-Version: 1.0
Karsten Hopp 8c54ba
Content-Type: text/plain; charset=UTF-8
Karsten Hopp 8c54ba
Content-Transfer-Encoding: 8bit
Karsten Hopp 8c54ba
------------
Karsten Hopp 8c54ba
Karsten Hopp 8c54ba
Patch 7.3.529
Karsten Hopp 8c54ba
Problem:    Using a count before "v" and "V" does not work (Kikyous)
Karsten Hopp 8c54ba
Solution:   Make the count select that many characters or lines. (Christian
Karsten Hopp 8c54ba
	    Brabandt)
Karsten Hopp 8c54ba
Files:	    src/normal.c
Karsten Hopp 8c54ba
Karsten Hopp 8c54ba
Karsten Hopp 8c54ba
*** ../vim-7.3.528/src/normal.c	2012-05-25 11:04:34.000000000 +0200
Karsten Hopp 8c54ba
--- src/normal.c	2012-05-25 13:12:06.000000000 +0200
Karsten Hopp 8c54ba
***************
Karsten Hopp 8c54ba
*** 7660,7672 ****
Karsten Hopp 8c54ba
      else		    /* start Visual mode */
Karsten Hopp 8c54ba
      {
Karsten Hopp 8c54ba
  	check_visual_highlight();
Karsten Hopp 8c54ba
! 	if (cap->count0)		    /* use previously selected part */
Karsten Hopp 8c54ba
  	{
Karsten Hopp 8c54ba
! 	    if (resel_VIsual_mode == NUL)   /* there is none */
Karsten Hopp 8c54ba
! 	    {
Karsten Hopp 8c54ba
! 		beep_flush();
Karsten Hopp 8c54ba
! 		return;
Karsten Hopp 8c54ba
! 	    }
Karsten Hopp 8c54ba
  	    VIsual = curwin->w_cursor;
Karsten Hopp 8c54ba
  
Karsten Hopp 8c54ba
  	    VIsual_active = TRUE;
Karsten Hopp 8c54ba
--- 7660,7668 ----
Karsten Hopp 8c54ba
      else		    /* start Visual mode */
Karsten Hopp 8c54ba
      {
Karsten Hopp 8c54ba
  	check_visual_highlight();
Karsten Hopp 8c54ba
! 	if (cap->count0 > 0 && resel_VIsual_mode != NUL)
Karsten Hopp 8c54ba
  	{
Karsten Hopp 8c54ba
! 	    /* use previously selected part */
Karsten Hopp 8c54ba
  	    VIsual = curwin->w_cursor;
Karsten Hopp 8c54ba
  
Karsten Hopp 8c54ba
  	    VIsual_active = TRUE;
Karsten Hopp 8c54ba
***************
Karsten Hopp 8c54ba
*** 7725,7730 ****
Karsten Hopp 8c54ba
--- 7721,7736 ----
Karsten Hopp 8c54ba
  		/* start Select mode when 'selectmode' contains "cmd" */
Karsten Hopp 8c54ba
  		may_start_select('c');
Karsten Hopp 8c54ba
  	    n_start_visual_mode(cap->cmdchar);
Karsten Hopp 8c54ba
+ 	    if (VIsual_mode != 'V' && *p_sel == 'e')
Karsten Hopp 8c54ba
+ 		++cap->count1;  /* include one more char */
Karsten Hopp 8c54ba
+ 	    if (cap->count0 > 0 && --cap->count1 > 0)
Karsten Hopp 8c54ba
+ 	    {
Karsten Hopp 8c54ba
+ 		/* With a count select that many characters or lines. */
Karsten Hopp 8c54ba
+ 		if (VIsual_mode == 'v' || VIsual_mode == Ctrl_V)
Karsten Hopp 8c54ba
+ 		    nv_right(cap);
Karsten Hopp 8c54ba
+ 		else if (VIsual_mode == 'V')
Karsten Hopp 8c54ba
+ 		    nv_down(cap);
Karsten Hopp 8c54ba
+ 	    }
Karsten Hopp 8c54ba
  	}
Karsten Hopp 8c54ba
      }
Karsten Hopp 8c54ba
  }
Karsten Hopp 8c54ba
*** ../vim-7.3.528/src/version.c	2012-05-25 12:38:57.000000000 +0200
Karsten Hopp 8c54ba
--- src/version.c	2012-05-25 12:59:58.000000000 +0200
Karsten Hopp 8c54ba
***************
Karsten Hopp 8c54ba
*** 716,717 ****
Karsten Hopp 8c54ba
--- 716,719 ----
Karsten Hopp 8c54ba
  {   /* Add new patch number below this line */
Karsten Hopp 8c54ba
+ /**/
Karsten Hopp 8c54ba
+     529,
Karsten Hopp 8c54ba
  /**/
Karsten Hopp 8c54ba
Karsten Hopp 8c54ba
-- 
Karsten Hopp 8c54ba
Normal people believe that if it ain't broke, don't fix it.  Engineers believe
Karsten Hopp 8c54ba
that if it ain't broke, it doesn't have enough features yet.
Karsten Hopp 8c54ba
				(Scott Adams - The Dilbert principle)
Karsten Hopp 8c54ba
Karsten Hopp 8c54ba
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp 8c54ba
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp 8c54ba
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp 8c54ba
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///