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