0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

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)
This commit is contained in:
Bram Moolenaar
2017-07-27 22:03:50 +02:00
parent ab6eec3887
commit d28cc3f55d
7 changed files with 44 additions and 14 deletions

View File

@@ -249,7 +249,7 @@ open_buffer(
netbeansFireChanges = oldFire;
#endif
/* Help buffer is filtered. */
if (curbuf->b_help)
if (bt_help(curbuf))
fix_help_buffer();
}
else if (read_stdin)
@@ -5668,6 +5668,15 @@ bt_terminal(buf_T *buf)
return buf != NULL && buf->b_p_bt[0] == 't';
}
/*
* Return TRUE if "buf" is a help buffer.
*/
int
bt_help(buf_T *buf)
{
return buf != NULL && buf->b_help;
}
/*
* Return TRUE if "buf" is a "nofile", "acwrite" or "terminal" buffer.
* This means the buffer name is not a file name.