components/vim/vim72-patches/7.2.261
changeset 198 172fc01ce997
equal deleted inserted replaced
197:fd801ec0737c 198:172fc01ce997
       
     1 To: [email protected]
       
     2 Subject: Patch 7.2.261
       
     3 Fcc: outbox
       
     4 From: Bram Moolenaar <[email protected]>
       
     5 Mime-Version: 1.0
       
     6 Content-Type: text/plain; charset=UTF-8
       
     7 Content-Transfer-Encoding: 8bit
       
     8 ------------
       
     9 
       
    10 Patch 7.2.261
       
    11 Problem:    When deleting lines with a specific folding configuration E38 may
       
    12 	    appear. (Shahaf)
       
    13 Solution:   When adjusting nested folds for deleted lines take into account
       
    14 	    that they don't start at the top of the enclosing fold.
       
    15 Files:	    src/fold.c
       
    16 
       
    17 
       
    18 *** ../vim-7.2.260/src/fold.c	2009-01-06 15:01:58.000000000 +0100
       
    19 --- src/fold.c	2009-09-18 14:43:23.000000000 +0200
       
    20 ***************
       
    21 *** 1607,1617 ****
       
    22   	    }
       
    23   	    else
       
    24   	    {
       
    25 - 		/* 2, 3, or 5: need to correct nested folds too */
       
    26 - 		foldMarkAdjustRecurse(&fp->fd_nested, line1 - fp->fd_top,
       
    27 - 				  line2 - fp->fd_top, amount, amount_after);
       
    28   		if (fp->fd_top < top)
       
    29   		{
       
    30   		    if (last <= line2)
       
    31   		    {
       
    32   			/* 2. fold contains line1, line2 is below fold */
       
    33 --- 1607,1617 ----
       
    34   	    }
       
    35   	    else
       
    36   	    {
       
    37   		if (fp->fd_top < top)
       
    38   		{
       
    39 + 		    /* 2 or 3: need to correct nested folds too */
       
    40 + 		    foldMarkAdjustRecurse(&fp->fd_nested, line1 - fp->fd_top,
       
    41 + 				  line2 - fp->fd_top, amount, amount_after);
       
    42   		    if (last <= line2)
       
    43   		    {
       
    44   			/* 2. fold contains line1, line2 is below fold */
       
    45 ***************
       
    46 *** 1628,1634 ****
       
    47   		}
       
    48   		else
       
    49   		{
       
    50 ! 		    /* 5. fold is below line1 and contains line2 */
       
    51   		    if (amount == MAXLNUM)
       
    52   		    {
       
    53   			fp->fd_len -= line2 - fp->fd_top + 1;
       
    54 --- 1628,1638 ----
       
    55   		}
       
    56   		else
       
    57   		{
       
    58 ! 		    /* 5. fold is below line1 and contains line2; need to
       
    59 ! 		     * correct nested folds too */
       
    60 ! 		    foldMarkAdjustRecurse(&fp->fd_nested, line1 - fp->fd_top,
       
    61 ! 				  line2 - fp->fd_top, amount,
       
    62 ! 				  amount_after + (fp->fd_top - top));
       
    63   		    if (amount == MAXLNUM)
       
    64   		    {
       
    65   			fp->fd_len -= line2 - fp->fd_top + 1;
       
    66 *** ../vim-7.2.260/src/version.c	2009-09-18 14:58:26.000000000 +0200
       
    67 --- src/version.c	2009-09-18 15:14:40.000000000 +0200
       
    68 ***************
       
    69 *** 678,679 ****
       
    70 --- 678,681 ----
       
    71   {   /* Add new patch number below this line */
       
    72 + /**/
       
    73 +     261,
       
    74   /**/
       
    75 
       
    76 -- 
       
    77 Emacs is a nice OS - but it lacks a good text editor.
       
    78 That's why I am using Vim.  --Anonymous
       
    79 
       
    80  /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
       
    81 ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
       
    82 \\\        download, build and distribute -- http://www.A-A-P.org        ///
       
    83  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///