components/vim/vim72-patches/7.2.359
changeset 198 172fc01ce997
equal deleted inserted replaced
197:fd801ec0737c 198:172fc01ce997
       
     1 To: [email protected]
       
     2 Subject: Patch 7.2.359
       
     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.359
       
    11 Problem:    Crash when using the Netbeans join command.
       
    12 Solution:   Make sure the ml_flush_line() function is not used recursively.
       
    13 	    (Xavier de Gaye)
       
    14 Files:	    src/memline.c
       
    15 
       
    16 
       
    17 *** ../vim-7.2.358/src/memline.c	2009-11-17 17:13:03.000000000 +0100
       
    18 --- src/memline.c	2010-02-11 18:47:48.000000000 +0100
       
    19 ***************
       
    20 *** 3087,3098 ****
       
    21 --- 3087,3105 ----
       
    22       int		start;
       
    23       int		count;
       
    24       int		i;
       
    25 +     static int  entered = FALSE;
       
    26   
       
    27       if (buf->b_ml.ml_line_lnum == 0 || buf->b_ml.ml_mfp == NULL)
       
    28   	return;		/* nothing to do */
       
    29   
       
    30       if (buf->b_ml.ml_flags & ML_LINE_DIRTY)
       
    31       {
       
    32 + 	/* This code doesn't work recursively, but Netbeans may call back here
       
    33 + 	 * when obtaining the cursor position. */
       
    34 + 	if (entered)
       
    35 + 	    return;
       
    36 + 	entered = TRUE;
       
    37 + 
       
    38   	lnum = buf->b_ml.ml_line_lnum;
       
    39   	new_line = buf->b_ml.ml_line_ptr;
       
    40   
       
    41 ***************
       
    42 *** 3160,3165 ****
       
    43 --- 3167,3174 ----
       
    44   	    }
       
    45   	}
       
    46   	vim_free(new_line);
       
    47 + 
       
    48 + 	entered = FALSE;
       
    49       }
       
    50   
       
    51       buf->b_ml.ml_line_lnum = 0;
       
    52 *** ../vim-7.2.358/src/version.c	2010-02-11 18:19:32.000000000 +0100
       
    53 --- src/version.c	2010-02-11 18:53:55.000000000 +0100
       
    54 ***************
       
    55 *** 683,684 ****
       
    56 --- 683,686 ----
       
    57   {   /* Add new patch number below this line */
       
    58 + /**/
       
    59 +     359,
       
    60   /**/
       
    61 
       
    62 -- 
       
    63 Your fault: core dumped
       
    64 
       
    65  /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
       
    66 ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
       
    67 \\\        download, build and distribute -- http://www.A-A-P.org        ///
       
    68  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///