lkundrak / rpms / vim

Forked from rpms/vim 4 years ago
Clone
f0b6d33
To: vim-dev@vim.org
f0b6d33
Subject: Patch 7.2.261
f0b6d33
Fcc: outbox
f0b6d33
From: Bram Moolenaar <Bram@moolenaar.net>
f0b6d33
Mime-Version: 1.0
f0b6d33
Content-Type: text/plain; charset=UTF-8
f0b6d33
Content-Transfer-Encoding: 8bit
f0b6d33
------------
f0b6d33
f0b6d33
Patch 7.2.261
f0b6d33
Problem:    When deleting lines with a specific folding configuration E38 may
f0b6d33
	    appear. (Shahaf)
f0b6d33
Solution:   When adjusting nested folds for deleted lines take into account
f0b6d33
	    that they don't start at the top of the enclosing fold.
f0b6d33
Files:	    src/fold.c
f0b6d33
f0b6d33
f0b6d33
*** ../vim-7.2.260/src/fold.c	2009-01-06 15:01:58.000000000 +0100
f0b6d33
--- src/fold.c	2009-09-18 14:43:23.000000000 +0200
f0b6d33
***************
f0b6d33
*** 1607,1617 ****
f0b6d33
  	    }
f0b6d33
  	    else
f0b6d33
  	    {
f0b6d33
- 		/* 2, 3, or 5: need to correct nested folds too */
f0b6d33
- 		foldMarkAdjustRecurse(&fp->fd_nested, line1 - fp->fd_top,
f0b6d33
- 				  line2 - fp->fd_top, amount, amount_after);
f0b6d33
  		if (fp->fd_top < top)
f0b6d33
  		{
f0b6d33
  		    if (last <= line2)
f0b6d33
  		    {
f0b6d33
  			/* 2. fold contains line1, line2 is below fold */
f0b6d33
--- 1607,1617 ----
f0b6d33
  	    }
f0b6d33
  	    else
f0b6d33
  	    {
f0b6d33
  		if (fp->fd_top < top)
f0b6d33
  		{
f0b6d33
+ 		    /* 2 or 3: need to correct nested folds too */
f0b6d33
+ 		    foldMarkAdjustRecurse(&fp->fd_nested, line1 - fp->fd_top,
f0b6d33
+ 				  line2 - fp->fd_top, amount, amount_after);
f0b6d33
  		    if (last <= line2)
f0b6d33
  		    {
f0b6d33
  			/* 2. fold contains line1, line2 is below fold */
f0b6d33
***************
f0b6d33
*** 1628,1634 ****
f0b6d33
  		}
f0b6d33
  		else
f0b6d33
  		{
f0b6d33
! 		    /* 5. fold is below line1 and contains line2 */
f0b6d33
  		    if (amount == MAXLNUM)
f0b6d33
  		    {
f0b6d33
  			fp->fd_len -= line2 - fp->fd_top + 1;
f0b6d33
--- 1628,1638 ----
f0b6d33
  		}
f0b6d33
  		else
f0b6d33
  		{
f0b6d33
! 		    /* 5. fold is below line1 and contains line2; need to
f0b6d33
! 		     * correct nested folds too */
f0b6d33
! 		    foldMarkAdjustRecurse(&fp->fd_nested, line1 - fp->fd_top,
f0b6d33
! 				  line2 - fp->fd_top, amount,
f0b6d33
! 				  amount_after + (fp->fd_top - top));
f0b6d33
  		    if (amount == MAXLNUM)
f0b6d33
  		    {
f0b6d33
  			fp->fd_len -= line2 - fp->fd_top + 1;
f0b6d33
*** ../vim-7.2.260/src/version.c	2009-09-18 14:58:26.000000000 +0200
f0b6d33
--- src/version.c	2009-09-18 15:14:40.000000000 +0200
f0b6d33
***************
f0b6d33
*** 678,679 ****
f0b6d33
--- 678,681 ----
f0b6d33
  {   /* Add new patch number below this line */
f0b6d33
+ /**/
f0b6d33
+     261,
f0b6d33
  /**/
f0b6d33
f0b6d33
-- 
f0b6d33
Emacs is a nice OS - but it lacks a good text editor.
f0b6d33
That's why I am using Vim.  --Anonymous
f0b6d33
f0b6d33
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
f0b6d33
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
f0b6d33
\\\        download, build and distribute -- http://www.A-A-P.org        ///
f0b6d33
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///