Blame SOURCES/7.4.407

22c937
To: vim_dev@googlegroups.com
22c937
Subject: Patch 7.4.407
22c937
Fcc: outbox
22c937
From: Bram Moolenaar <Bram@moolenaar.net>
22c937
Mime-Version: 1.0
22c937
Content-Type: text/plain; charset=UTF-8
22c937
Content-Transfer-Encoding: 8bit
22c937
------------
22c937
22c937
Patch 7.4.407
22c937
Problem:    Inserting text for Visual block mode, with cursor movement,
22c937
	    repeats the wrong text. (Aleksandar Ivanov)
22c937
Solution:   Reset the update_Insstart_orig flag. (Christian Brabandt)
22c937
Files:	    src/edit.c, src/testdir/test39.in, src/testdir/test39.ok
22c937
22c937
22c937
*** ../vim-7.4.406/src/edit.c	2014-07-30 16:00:45.543553496 +0200
22c937
--- src/edit.c	2014-08-16 18:10:10.914050861 +0200
22c937
***************
22c937
*** 6768,6780 ****
22c937
  {
22c937
      if (arrow_used)
22c937
      {
22c937
  	if (u_save_cursor() == OK)
22c937
  	{
22c937
  	    arrow_used = FALSE;
22c937
  	    ins_need_undo = FALSE;
22c937
  	}
22c937
! 	Insstart = curwin->w_cursor;	/* new insertion starts here */
22c937
! 	Insstart_textlen = (colnr_T)linetabsize(ml_get_curline());
22c937
  	ai_col = 0;
22c937
  #ifdef FEAT_VREPLACE
22c937
  	if (State & VREPLACE_FLAG)
22c937
--- 6768,6786 ----
22c937
  {
22c937
      if (arrow_used)
22c937
      {
22c937
+ 	Insstart = curwin->w_cursor;	/* new insertion starts here */
22c937
+ 	if (Insstart.col > Insstart_orig.col && !ins_need_undo)
22c937
+ 	    /* Don't update the original insert position when moved to the
22c937
+ 	     * right, except when nothing was inserted yet. */
22c937
+ 	    update_Insstart_orig = FALSE;
22c937
+ 	Insstart_textlen = (colnr_T)linetabsize(ml_get_curline());
22c937
+ 
22c937
  	if (u_save_cursor() == OK)
22c937
  	{
22c937
  	    arrow_used = FALSE;
22c937
  	    ins_need_undo = FALSE;
22c937
  	}
22c937
! 
22c937
  	ai_col = 0;
22c937
  #ifdef FEAT_VREPLACE
22c937
  	if (State & VREPLACE_FLAG)
22c937
*** ../vim-7.4.406/src/testdir/test39.in	2014-03-19 18:57:27.730175565 +0100
22c937
--- src/testdir/test39.in	2014-08-16 17:52:23.078089588 +0200
22c937
***************
22c937
*** 23,28 ****
22c937
--- 23,31 ----
22c937
  /^aaaa/
22c937
  :exe ":norm! l\<C-V>jjjlllI\<Right>\<Right>  \<Esc>"
22c937
  :/^aa/,/^$/w >> test.out
22c937
+ /xaaa$/
22c937
+ :exe ":norm! \<C-V>jjjI<>\<Left>p\<Esc>"
22c937
+ :/xaaa$/,/^$/w >> test.out
22c937
  :" Test for Visual block was created with the last <C-v>$
22c937
  /^A23$/
22c937
  :exe ":norm! l\<C-V>j$Aab\<Esc>"
22c937
***************
22c937
*** 77,82 ****
22c937
--- 80,90 ----
22c937
  cccccc
22c937
  dddddd
22c937
  
22c937
+ xaaa
22c937
+ bbbb
22c937
+ cccc
22c937
+ dddd
22c937
+ 
22c937
  A23
22c937
  4567
22c937
  
22c937
*** ../vim-7.4.406/src/testdir/test39.ok	2014-03-19 18:57:27.730175565 +0100
22c937
--- src/testdir/test39.ok	2014-08-16 17:50:57.330092698 +0200
22c937
***************
22c937
*** 8,13 ****
22c937
--- 8,18 ----
22c937
  ccc  ccc
22c937
  ddd  ddd
22c937
  
22c937
+ 

xaaa

22c937
+ 

bbbb

22c937
+ 

cccc

22c937
+ 

dddd

22c937
+ 
22c937
  A23ab
22c937
  4567ab
22c937
  
22c937
*** ../vim-7.4.406/src/version.c	2014-08-16 17:34:31.186128463 +0200
22c937
--- src/version.c	2014-08-16 17:38:30.546119782 +0200
22c937
***************
22c937
*** 743,744 ****
22c937
--- 743,746 ----
22c937
  {   /* Add new patch number below this line */
22c937
+ /**/
22c937
+     407,
22c937
  /**/
22c937
22c937
-- 
22c937
'Well, here's something to occupy you and keep your mind off things.'
22c937
'It won't work, I have an exceptionally large mind.'
22c937
		-- Douglas Adams, "The Hitchhiker's Guide to the Galaxy"
22c937
22c937
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
22c937
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
22c937
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
22c937
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///