Karsten Hopp f66554
To: vim_dev@googlegroups.com
Karsten Hopp f66554
Subject: Patch 7.4.798
Karsten Hopp f66554
Fcc: outbox
Karsten Hopp f66554
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp f66554
Mime-Version: 1.0
Karsten Hopp f66554
Content-Type: text/plain; charset=UTF-8
Karsten Hopp f66554
Content-Transfer-Encoding: 8bit
Karsten Hopp f66554
------------
Karsten Hopp f66554
Karsten Hopp f66554
Patch 7.4.798 (after 7.4.753)
Karsten Hopp f66554
Problem:    Repeating a change in Visual mode does not work as expected.
Karsten Hopp f66554
            (Urtica Dioica)
Karsten Hopp f66554
Solution:   Make redo in Visual mode work better. (Christian Brabandt)
Karsten Hopp f66554
Files:      src/normal.c, src/testdir/test_listlbr.in,
Karsten Hopp f66554
            src/testdir/test_listlbr.ok
Karsten Hopp f66554
Karsten Hopp f66554
Karsten Hopp f66554
*** ../vim-7.4.797/src/normal.c	2015-07-21 17:53:11.581527951 +0200
Karsten Hopp f66554
--- src/normal.c	2015-07-28 11:11:58.479169612 +0200
Karsten Hopp f66554
***************
Karsten Hopp f66554
*** 9598,9615 ****
Karsten Hopp f66554
  #endif
Karsten Hopp f66554
  
Karsten Hopp f66554
      getvvcol(curwin, &(oap->start), &oap->start_vcol, NULL, &oap->end_vcol);
Karsten Hopp f66554
-     getvvcol(curwin, &(oap->end), &start, NULL, &end;;
Karsten Hopp f66554
  
Karsten Hopp f66554
!     if (start < oap->start_vcol)
Karsten Hopp f66554
! 	oap->start_vcol = start;
Karsten Hopp f66554
!     if (end > oap->end_vcol)
Karsten Hopp f66554
      {
Karsten Hopp f66554
! 	if (initial && *p_sel == 'e' && start >= 1
Karsten Hopp f66554
! 			&& start - 1 >= oap->end_vcol)
Karsten Hopp f66554
! 	    oap->end_vcol = start - 1;
Karsten Hopp f66554
! 	else
Karsten Hopp f66554
! 	    oap->end_vcol = end;
Karsten Hopp f66554
      }
Karsten Hopp f66554
      /* if '$' was used, get oap->end_vcol from longest line */
Karsten Hopp f66554
      if (curwin->w_curswant == MAXCOL)
Karsten Hopp f66554
      {
Karsten Hopp f66554
--- 9598,9620 ----
Karsten Hopp f66554
  #endif
Karsten Hopp f66554
  
Karsten Hopp f66554
      getvvcol(curwin, &(oap->start), &oap->start_vcol, NULL, &oap->end_vcol);
Karsten Hopp f66554
  
Karsten Hopp f66554
!     if (!redo_VIsual_busy)
Karsten Hopp f66554
      {
Karsten Hopp f66554
! 	getvvcol(curwin, &(oap->end), &start, NULL, &end;;
Karsten Hopp f66554
! 
Karsten Hopp f66554
! 	if (start < oap->start_vcol)
Karsten Hopp f66554
! 	    oap->start_vcol = start;
Karsten Hopp f66554
! 	if (end > oap->end_vcol)
Karsten Hopp f66554
! 	{
Karsten Hopp f66554
! 	    if (initial && *p_sel == 'e' && start >= 1
Karsten Hopp f66554
! 				    && start - 1 >= oap->end_vcol)
Karsten Hopp f66554
! 		oap->end_vcol = start - 1;
Karsten Hopp f66554
! 	    else
Karsten Hopp f66554
! 		oap->end_vcol = end;
Karsten Hopp f66554
! 	}
Karsten Hopp f66554
      }
Karsten Hopp f66554
+ 
Karsten Hopp f66554
      /* if '$' was used, get oap->end_vcol from longest line */
Karsten Hopp f66554
      if (curwin->w_curswant == MAXCOL)
Karsten Hopp f66554
      {
Karsten Hopp f66554
*** ../vim-7.4.797/src/testdir/test_listlbr.in	2015-06-25 13:30:41.206095684 +0200
Karsten Hopp f66554
--- src/testdir/test_listlbr.in	2015-07-28 11:11:39.487362238 +0200
Karsten Hopp f66554
***************
Karsten Hopp f66554
*** 74,79 ****
Karsten Hopp f66554
--- 74,85 ----
Karsten Hopp f66554
  :let g:test ="Test 8: set linebreak with visual char mode and changing block"
Karsten Hopp f66554
  :$put =g:test
Karsten Hopp f66554
  Go1111-1111-1111-11-1111-1111-1111?0f-lv3lc2222?bgj.
Karsten Hopp f66554
+ :let g:test ="Test 9: using redo after block visual mode"
Karsten Hopp f66554
+ :$put =g:test
Karsten Hopp f66554
+ Go
Karsten Hopp f66554
+ aaa
Karsten Hopp f66554
+ aaa
Karsten Hopp f66554
+ a?2k?2j~e.
Karsten Hopp f66554
  :%w! test.out
Karsten Hopp f66554
  :qa!
Karsten Hopp f66554
  ENDTEST
Karsten Hopp f66554
*** ../vim-7.4.797/src/testdir/test_listlbr.ok	2015-06-25 13:30:41.206095684 +0200
Karsten Hopp f66554
--- src/testdir/test_listlbr.ok	2015-07-28 11:11:39.487362238 +0200
Karsten Hopp f66554
***************
Karsten Hopp f66554
*** 41,43 ****
Karsten Hopp f66554
--- 41,48 ----
Karsten Hopp f66554
  long line: foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar foobar TARGETx at end
Karsten Hopp f66554
  Test 8: set linebreak with visual char mode and changing block
Karsten Hopp f66554
  1111-2222-1111-11-1111-2222-1111
Karsten Hopp f66554
+ Test 9: using redo after block visual mode
Karsten Hopp f66554
+ 
Karsten Hopp f66554
+ AaA
Karsten Hopp f66554
+ AaA
Karsten Hopp f66554
+ A
Karsten Hopp f66554
*** ../vim-7.4.797/src/version.c	2015-07-25 22:52:55.396781119 +0200
Karsten Hopp f66554
--- src/version.c	2015-07-28 11:11:21.699542664 +0200
Karsten Hopp f66554
***************
Karsten Hopp f66554
*** 743,744 ****
Karsten Hopp f66554
--- 743,746 ----
Karsten Hopp f66554
  {   /* Add new patch number below this line */
Karsten Hopp f66554
+ /**/
Karsten Hopp f66554
+     798,
Karsten Hopp f66554
  /**/
Karsten Hopp f66554
Karsten Hopp f66554
-- 
Karsten Hopp f66554
    A KNIGHT rides into shot and hacks him to the ground.  He rides off.
Karsten Hopp f66554
    We stay for a moment on the glade.  A MIDDLE-AGED LADY in a C. & A.
Karsten Hopp f66554
    twin-set emerges from the trees and looks in horror at the body of her
Karsten Hopp f66554
    HUSBAND.
Karsten Hopp f66554
MRS HISTORIAN: FRANK!
Karsten Hopp f66554
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
Karsten Hopp f66554
Karsten Hopp f66554
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp f66554
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp f66554
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp f66554
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///