d521674
To: vim_dev@googlegroups.com
d521674
Subject: Patch 7.4.929
d521674
Fcc: outbox
d521674
From: Bram Moolenaar <Bram@moolenaar.net>
d521674
Mime-Version: 1.0
d521674
Content-Type: text/plain; charset=UTF-8
d521674
Content-Transfer-Encoding: 8bit
d521674
------------
d521674
d521674
Patch 7.4.929
d521674
Problem:    "gv" after paste selects one character less if 'selection' is
d521674
            "exclusive".
d521674
Solution:   Increment the end position. (Christian Brabandt)
d521674
Files:      src/normal.c, src/testdir/test94.in, src/testdir/test94.ok
d521674
d521674
d521674
*** ../vim-7.4.928/src/normal.c	2015-09-25 19:34:57.891936941 +0200
d521674
--- src/normal.c	2015-11-19 20:09:02.567921274 +0100
d521674
***************
d521674
*** 9496,9501 ****
d521674
--- 9496,9504 ----
d521674
  	{
d521674
  	    curbuf->b_visual.vi_start = curbuf->b_op_start;
d521674
  	    curbuf->b_visual.vi_end = curbuf->b_op_end;
d521674
+ 	    /* need to adjust cursor position */
d521674
+ 	    if (*p_sel == 'e')
d521674
+ 		inc(&curbuf->b_visual.vi_end);
d521674
  	}
d521674
  
d521674
  	/* When all lines were selected and deleted do_put() leaves an empty
d521674
*** ../vim-7.4.928/src/testdir/test94.in	2015-06-19 15:17:49.891065610 +0200
d521674
--- src/testdir/test94.in	2015-11-19 20:08:31.508255552 +0100
d521674
***************
d521674
*** 210,215 ****
d521674
--- 210,230 ----
d521674
  :-2yank
d521674
  $v$p
d521674
  :$put ='---'
d521674
+ :
d521674
+ :$put =''
d521674
+ :$put ='gv in exclusive select mode after operation'
d521674
+ :$put ='zzz '
d521674
+ :$put ='äà '
d521674
+ :set selection=exclusive
d521674
+ kv3lyjv3lpgvcxxx?
d521674
+ :$put ='---'
d521674
+ :
d521674
+ :$put =''
d521674
+ :$put ='gv in exclusive select mode without operation'
d521674
+ :$put ='zzz '
d521674
+ :set selection=exclusive
d521674
+ 0v3l?gvcxxx?
d521674
+ :$put ='---'
d521674
  :/^start:/+2,$w! test.out
d521674
  :q!
d521674
  ENDTEST
d521674
*** ../vim-7.4.928/src/testdir/test94.ok	2015-06-19 15:17:49.891065610 +0200
d521674
--- src/testdir/test94.ok	2015-11-19 19:59:32.450049406 +0100
d521674
***************
d521674
*** 112,114 ****
d521674
--- 112,123 ----
d521674
  aaa
d521674
  
d521674
  ---
d521674
+ 
d521674
+ gv in exclusive select mode after operation
d521674
+ zzz 
d521674
+ xxx 
d521674
+ ---
d521674
+ 
d521674
+ gv in exclusive select mode without operation
d521674
+ xxx 
d521674
+ ---
d521674
*** ../vim-7.4.928/src/version.c	2015-11-19 19:55:12.340839491 +0100
d521674
--- src/version.c	2015-11-19 19:59:18.198202378 +0100
d521674
***************
d521674
*** 743,744 ****
d521674
--- 743,746 ----
d521674
  {   /* Add new patch number below this line */
d521674
+ /**/
d521674
+     929,
d521674
  /**/
d521674
d521674
-- 
d521674
Support your right to bare arms!  Wear short sleeves!
d521674
d521674
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
d521674
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
d521674
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
d521674
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///