diff src/ex_cmds.c @ 11800:5ceaecedbad2 v8.0.0782

patch 8.0.0782: using freed memory in quickfix code commit https://github.com/vim/vim/commit/d28cc3f55d4a5a980f6ac6fa682382822a223720 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Jul 27 22:03:50 2017 +0200 patch 8.0.0782: using freed memory in quickfix code Problem: Using freed memory in quickfix code. (Dominique Pelle) Solution: Handle a help window differently. (Yegappan Lakshmanan)
author Christian Brabandt <cb@256bit.org>
date Thu, 27 Jul 2017 22:15:03 +0200
parents 5cd9ba96561d
children bc0fee081e1e
line wrap: on
line diff
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -6314,7 +6314,7 @@ ex_help(exarg_T *eap)
      * Re-use an existing help window or open a new one.
      * Always open a new one for ":tab help".
      */
-    if (!curwin->w_buffer->b_help
+    if (!bt_help(curwin->w_buffer)
 #ifdef FEAT_WINDOWS
 	    || cmdmod.tab != 0
 #endif
@@ -6325,7 +6325,7 @@ ex_help(exarg_T *eap)
 	    wp = NULL;
 	else
 	    FOR_ALL_WINDOWS(wp)
-		if (wp->w_buffer != NULL && wp->w_buffer->b_help)
+		if (bt_help(wp->w_buffer))
 		    break;
 	if (wp != NULL && wp->w_buffer->b_nwindows > 0)
 	    win_enter(wp, TRUE);
@@ -6425,7 +6425,7 @@ ex_helpclose(exarg_T *eap UNUSED)
 
     FOR_ALL_WINDOWS(win)
     {
-	if (win->w_buffer->b_help)
+	if (bt_help(win->w_buffer))
 	{
 	    win_close(win, FALSE);
 	    return;