summaryrefslogtreecommitdiff
path: root/src/ex_cmds.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-07-27 22:03:50 +0200
committerBram Moolenaar <Bram@vim.org>2017-07-27 22:03:50 +0200
commitd28cc3f55d4a5a980f6ac6fa682382822a223720 (patch)
treeafbd1226f742817a8a86a8d256587bf2a93a7daf /src/ex_cmds.c
parentab6eec3887d68c260b50b1b8f9ed95d49d9306c6 (diff)
downloadvim-git-d28cc3f55d4a5a980f6ac6fa682382822a223720.tar.gz
patch 8.0.0782: using freed memory in quickfix codev8.0.0782
Problem: Using freed memory in quickfix code. (Dominique Pelle) Solution: Handle a help window differently. (Yegappan Lakshmanan)
Diffstat (limited to 'src/ex_cmds.c')
-rw-r--r--src/ex_cmds.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index 9c84e24b1..6ec3ded90 100644
--- 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;