Karsten Hopp 9831e6
To: vim-dev@vim.org
Karsten Hopp 9831e6
Subject: Patch 7.0.154
Karsten Hopp 9831e6
Fcc: outbox
Karsten Hopp 9831e6
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp 9831e6
Mime-Version: 1.0
Karsten Hopp 9831e6
Content-Type: text/plain; charset=ISO-8859-1
Karsten Hopp 9831e6
Content-Transfer-Encoding: 8bit
Karsten Hopp 9831e6
------------
Karsten Hopp 9831e6
Karsten Hopp 9831e6
Patch 7.0.154
Karsten Hopp 9831e6
Problem:    When 'foldnextmax' is negative Vim can hang. (James Vega)
Karsten Hopp 9831e6
Solution:   Avoid the fold level becoming negative.
Karsten Hopp 9831e6
Files:	    src/fold.c, src/syntax.c
Karsten Hopp 9831e6
Karsten Hopp 9831e6
Karsten Hopp 9831e6
*** ../vim-7.0.153/src/fold.c	Sun Apr 23 00:31:04 2006
Karsten Hopp 9831e6
--- src/fold.c	Sun Oct 29 20:23:21 2006
Karsten Hopp 9831e6
***************
Karsten Hopp 9831e6
*** 2971,2977 ****
Karsten Hopp 9831e6
--- 2971,2981 ----
Karsten Hopp 9831e6
      else
Karsten Hopp 9831e6
  	flp->lvl = get_indent_buf(buf, lnum) / buf->b_p_sw;
Karsten Hopp 9831e6
      if (flp->lvl > flp->wp->w_p_fdn)
Karsten Hopp 9831e6
+     {
Karsten Hopp 9831e6
  	flp->lvl = flp->wp->w_p_fdn;
Karsten Hopp 9831e6
+ 	if (flp->lvl < 0)
Karsten Hopp 9831e6
+ 	    flp->lvl = 0;
Karsten Hopp 9831e6
+     }
Karsten Hopp 9831e6
  }
Karsten Hopp 9831e6
  
Karsten Hopp 9831e6
  /* foldlevelDiff() {{{2 */
Karsten Hopp 9831e6
*** ../vim-7.0.153/src/syntax.c	Tue Oct  3 17:04:21 2006
Karsten Hopp 9831e6
--- src/syntax.c	Sun Oct 29 20:21:27 2006
Karsten Hopp 9831e6
***************
Karsten Hopp 9831e6
*** 6072,6078 ****
Karsten Hopp 9831e6
--- 6072,6082 ----
Karsten Hopp 9831e6
  		++level;
Karsten Hopp 9831e6
      }
Karsten Hopp 9831e6
      if (level > wp->w_p_fdn)
Karsten Hopp 9831e6
+     {
Karsten Hopp 9831e6
  	level = wp->w_p_fdn;
Karsten Hopp 9831e6
+ 	if (level < 0)
Karsten Hopp 9831e6
+ 	    level = 0;
Karsten Hopp 9831e6
+     }
Karsten Hopp 9831e6
      return level;
Karsten Hopp 9831e6
  }
Karsten Hopp 9831e6
  #endif
Karsten Hopp 9831e6
*** ../vim-7.0.153/src/version.c	Mon Oct 30 22:31:30 2006
Karsten Hopp 9831e6
--- src/version.c	Wed Nov  1 12:41:14 2006
Karsten Hopp 9831e6
***************
Karsten Hopp 9831e6
*** 668,669 ****
Karsten Hopp 9831e6
--- 668,671 ----
Karsten Hopp 9831e6
  {   /* Add new patch number below this line */
Karsten Hopp 9831e6
+ /**/
Karsten Hopp 9831e6
+     154,
Karsten Hopp 9831e6
  /**/
Karsten Hopp 9831e6
Karsten Hopp 9831e6
-- 
Karsten Hopp 9831e6
hundred-and-one symptoms of being an internet addict:
Karsten Hopp 9831e6
134. You consider bandwidth to be more important than carats.
Karsten Hopp 9831e6
Karsten Hopp 9831e6
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp 9831e6
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp 9831e6
\\\        download, build and distribute -- http://www.A-A-P.org        ///
Karsten Hopp 9831e6
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///