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

xaaa

Karsten Hopp 432fc4
+ 

bbbb

Karsten Hopp 432fc4
+ 

cccc

Karsten Hopp 432fc4
+ 

dddd

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