astepano / rpms / vim

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

xaaa

432fc48
+ 

bbbb

432fc48
+ 

cccc

432fc48
+ 

dddd

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