81c2858
To: vim-dev@vim.org
81c2858
Subject: Patch 7.2.207
81c2858
Fcc: outbox
81c2858
From: Bram Moolenaar <Bram@moolenaar.net>
81c2858
Mime-Version: 1.0
81c2858
Content-Type: text/plain; charset=UTF-8
81c2858
Content-Transfer-Encoding: 8bit
81c2858
------------
81c2858
81c2858
Patch 7.2.207
81c2858
Problem:    Using freed memory with ":redrawstatus" when it works recursively.
81c2858
Solution:   Prevent recursively updating the status line. (partly by Dominique
81c2858
	    Pelle)
81c2858
Files:	    src/screen.c
81c2858
81c2858
81c2858
*** ../vim-7.2.206/src/screen.c	2009-06-16 16:01:34.000000000 +0200
81c2858
--- src/screen.c	2009-06-16 17:04:53.000000000 +0200
81c2858
***************
81c2858
*** 5743,5748 ****
81c2858
--- 5743,5755 ----
81c2858
      int		fillchar;
81c2858
      int		attr;
81c2858
      int		this_ru_col;
81c2858
+     static int  busy = FALSE;
81c2858
+ 
81c2858
+     /* It's possible to get here recursively when 'statusline' (indirectly)
81c2858
+      * invokes ":redrawstatus".  Simply ignore the call then. */
81c2858
+     if (busy)
81c2858
+ 	return;
81c2858
+     busy = TRUE;
81c2858
  
81c2858
      wp->w_redr_status = FALSE;
81c2858
      if (wp->w_status_height == 0)
81c2858
***************
81c2858
*** 5881,5886 ****
81c2858
--- 5888,5894 ----
81c2858
  									attr);
81c2858
      }
81c2858
  #endif
81c2858
+     busy = FALSE;
81c2858
  }
81c2858
  
81c2858
  #ifdef FEAT_STL_OPT
81c2858
*** ../vim-7.2.206/src/version.c	2009-06-16 16:57:53.000000000 +0200
81c2858
--- src/version.c	2009-06-16 17:21:56.000000000 +0200
81c2858
***************
81c2858
*** 678,679 ****
81c2858
--- 678,681 ----
81c2858
  {   /* Add new patch number below this line */
81c2858
+ /**/
81c2858
+     207,
81c2858
  /**/
81c2858
81c2858
-- 
81c2858
In many of the more relaxed civilizations on the Outer Eastern Rim of the
81c2858
Galaxy, "The Hitchhiker's Guide to the Galaxy" has already supplanted the
81c2858
great "Encyclopedia Galactica" as the standard repository of all knowledge
81c2858
and wisdom, for though it has many omissions and contains much that is
81c2858
apocryphal, or at least wildly inaccurate, it scores over the older, more
81c2858
pedestrian work in two important respects.
81c2858
First, it is slightly cheaper; and second, it has the words "DON'T PANIC"
81c2858
inscribed in large friendly letters on its cover.
81c2858
		-- Douglas Adams, "The Hitchhiker's Guide to the Galaxy"
81c2858
81c2858
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
81c2858
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
81c2858
\\\        download, build and distribute -- http://www.A-A-P.org        ///
81c2858
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///