f0b6d33
To: vim-dev@vim.org
f0b6d33
Subject: Patch 7.2.207
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.207
f0b6d33
Problem:    Using freed memory with ":redrawstatus" when it works recursively.
f0b6d33
Solution:   Prevent recursively updating the status line. (partly by Dominique
f0b6d33
	    Pelle)
f0b6d33
Files:	    src/screen.c
f0b6d33
f0b6d33
f0b6d33
*** ../vim-7.2.206/src/screen.c	2009-06-16 16:01:34.000000000 +0200
f0b6d33
--- src/screen.c	2009-06-16 17:04:53.000000000 +0200
f0b6d33
***************
f0b6d33
*** 5743,5748 ****
f0b6d33
--- 5743,5755 ----
f0b6d33
      int		fillchar;
f0b6d33
      int		attr;
f0b6d33
      int		this_ru_col;
f0b6d33
+     static int  busy = FALSE;
f0b6d33
+ 
f0b6d33
+     /* It's possible to get here recursively when 'statusline' (indirectly)
f0b6d33
+      * invokes ":redrawstatus".  Simply ignore the call then. */
f0b6d33
+     if (busy)
f0b6d33
+ 	return;
f0b6d33
+     busy = TRUE;
f0b6d33
  
f0b6d33
      wp->w_redr_status = FALSE;
f0b6d33
      if (wp->w_status_height == 0)
f0b6d33
***************
f0b6d33
*** 5881,5886 ****
f0b6d33
--- 5888,5894 ----
f0b6d33
  									attr);
f0b6d33
      }
f0b6d33
  #endif
f0b6d33
+     busy = FALSE;
f0b6d33
  }
f0b6d33
  
f0b6d33
  #ifdef FEAT_STL_OPT
f0b6d33
*** ../vim-7.2.206/src/version.c	2009-06-16 16:57:53.000000000 +0200
f0b6d33
--- src/version.c	2009-06-16 17:21:56.000000000 +0200
f0b6d33
***************
f0b6d33
*** 678,679 ****
f0b6d33
--- 678,681 ----
f0b6d33
  {   /* Add new patch number below this line */
f0b6d33
+ /**/
f0b6d33
+     207,
f0b6d33
  /**/
f0b6d33
f0b6d33
-- 
f0b6d33
In many of the more relaxed civilizations on the Outer Eastern Rim of the
f0b6d33
Galaxy, "The Hitchhiker's Guide to the Galaxy" has already supplanted the
f0b6d33
great "Encyclopedia Galactica" as the standard repository of all knowledge
f0b6d33
and wisdom, for though it has many omissions and contains much that is
f0b6d33
apocryphal, or at least wildly inaccurate, it scores over the older, more
f0b6d33
pedestrian work in two important respects.
f0b6d33
First, it is slightly cheaper; and second, it has the words "DON'T PANIC"
f0b6d33
inscribed in large friendly letters on its cover.
f0b6d33
		-- Douglas Adams, "The Hitchhiker's Guide to the Galaxy"
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    ///