Karsten Hopp f4c9ab
To: vim_dev@googlegroups.com
Karsten Hopp f4c9ab
Subject: Patch 7.4.559
Karsten Hopp f4c9ab
Fcc: outbox
Karsten Hopp f4c9ab
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp f4c9ab
Mime-Version: 1.0
Karsten Hopp f4c9ab
Content-Type: text/plain; charset=UTF-8
Karsten Hopp f4c9ab
Content-Transfer-Encoding: 8bit
Karsten Hopp f4c9ab
------------
Karsten Hopp f4c9ab
Karsten Hopp f4c9ab
Patch 7.4.559
Karsten Hopp f4c9ab
Problem:    Appending a block in the middle of a tab does not work correctly
Karsten Hopp f4c9ab
	    when virtualedit is set.
Karsten Hopp f4c9ab
Solution:   Decrement spaces and count, don't reset them. (James McCoy)
Karsten Hopp f4c9ab
Files:	    src/ops.c, src/testdir/test39.in, src/testdir/test39.ok
Karsten Hopp f4c9ab
Karsten Hopp f4c9ab
Karsten Hopp f4c9ab
*** ../vim-7.4.558/src/ops.c	2014-11-19 17:35:35.081446695 +0100
Karsten Hopp f4c9ab
--- src/ops.c	2014-12-17 18:28:39.034973177 +0100
Karsten Hopp f4c9ab
***************
Karsten Hopp f4c9ab
*** 612,631 ****
Karsten Hopp f4c9ab
  #ifdef FEAT_MBYTE
Karsten Hopp f4c9ab
  	if (has_mbyte && spaces > 0)
Karsten Hopp f4c9ab
  	{
Karsten Hopp f4c9ab
  	    /* Avoid starting halfway a multi-byte character. */
Karsten Hopp f4c9ab
  	    if (b_insert)
Karsten Hopp f4c9ab
  	    {
Karsten Hopp f4c9ab
! 		int off = (*mb_head_off)(oldp, oldp + offset + spaces);
Karsten Hopp f4c9ab
! 		spaces -= off;
Karsten Hopp f4c9ab
! 		count -= off;
Karsten Hopp f4c9ab
  	    }
Karsten Hopp f4c9ab
  	    else
Karsten Hopp f4c9ab
  	    {
Karsten Hopp f4c9ab
! 		int off = (*mb_off_next)(oldp, oldp + offset);
Karsten Hopp f4c9ab
  		offset += off;
Karsten Hopp f4c9ab
- 		spaces = 0;
Karsten Hopp f4c9ab
- 		count = 0;
Karsten Hopp f4c9ab
  	    }
Karsten Hopp f4c9ab
  	}
Karsten Hopp f4c9ab
  #endif
Karsten Hopp f4c9ab
  
Karsten Hopp f4c9ab
--- 612,631 ----
Karsten Hopp f4c9ab
  #ifdef FEAT_MBYTE
Karsten Hopp f4c9ab
  	if (has_mbyte && spaces > 0)
Karsten Hopp f4c9ab
  	{
Karsten Hopp f4c9ab
+ 	    int off;
Karsten Hopp f4c9ab
+ 
Karsten Hopp f4c9ab
  	    /* Avoid starting halfway a multi-byte character. */
Karsten Hopp f4c9ab
  	    if (b_insert)
Karsten Hopp f4c9ab
  	    {
Karsten Hopp f4c9ab
! 		off = (*mb_head_off)(oldp, oldp + offset + spaces);
Karsten Hopp f4c9ab
  	    }
Karsten Hopp f4c9ab
  	    else
Karsten Hopp f4c9ab
  	    {
Karsten Hopp f4c9ab
! 		off = (*mb_off_next)(oldp, oldp + offset);
Karsten Hopp f4c9ab
  		offset += off;
Karsten Hopp f4c9ab
  	    }
Karsten Hopp f4c9ab
+ 	    spaces -= off;
Karsten Hopp f4c9ab
+ 	    count -= off;
Karsten Hopp f4c9ab
  	}
Karsten Hopp f4c9ab
  #endif
Karsten Hopp f4c9ab
  
Karsten Hopp f4c9ab
*** ../vim-7.4.558/src/testdir/test39.ok	2014-08-16 18:13:00.082044726 +0200
Karsten Hopp f4c9ab
--- src/testdir/test39.ok	2014-12-17 18:18:33.090470463 +0100
Karsten Hopp f4c9ab
***************
Karsten Hopp f4c9ab
*** 26,31 ****
Karsten Hopp f4c9ab
--- 26,35 ----
Karsten Hopp f4c9ab
         x 	line2
Karsten Hopp f4c9ab
         x 	line3
Karsten Hopp f4c9ab
  
Karsten Hopp f4c9ab
+        x     x   line1
Karsten Hopp f4c9ab
+        x     x   line2
Karsten Hopp f4c9ab
+        x     x   line3
Karsten Hopp f4c9ab
+ 
Karsten Hopp f4c9ab
  the YOUTUSSEUU end
Karsten Hopp f4c9ab
  - yOUSSTUSSEXu -
Karsten Hopp f4c9ab
  THE YOUTUSSEUU END
Karsten Hopp f4c9ab
*** ../vim-7.4.558/src/version.c	2014-12-17 17:59:26.916631344 +0100
Karsten Hopp f4c9ab
--- src/version.c	2014-12-17 18:32:23.276199179 +0100
Karsten Hopp f4c9ab
***************
Karsten Hopp f4c9ab
*** 743,744 ****
Karsten Hopp f4c9ab
--- 743,746 ----
Karsten Hopp f4c9ab
  {   /* Add new patch number below this line */
Karsten Hopp f4c9ab
+ /**/
Karsten Hopp f4c9ab
+     559,
Karsten Hopp f4c9ab
  /**/
Karsten Hopp f4c9ab
Karsten Hopp f4c9ab
-- 
Karsten Hopp f4c9ab
hundred-and-one symptoms of being an internet addict:
Karsten Hopp f4c9ab
15. Your heart races faster and beats irregularly each time you see a new WWW
Karsten Hopp f4c9ab
    site address in print or on TV, even though you've never had heart
Karsten Hopp f4c9ab
    problems before.
Karsten Hopp f4c9ab
Karsten Hopp f4c9ab
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp f4c9ab
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp f4c9ab
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp f4c9ab
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///