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:
11
src/buffer.c
11
src/buffer.c
@@ -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.
|
||||
|
Reference in New Issue
Block a user