mirror of
https://github.com/neovim/neovim.git
synced 2025-09-11 05:48:17 +00:00
vim-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)
d28cc3f55d
This commit is contained in:
@@ -252,7 +252,7 @@ open_buffer (
|
||||
msg_silent = old_msg_silent;
|
||||
|
||||
// Help buffer is filtered.
|
||||
if (curbuf->b_help) {
|
||||
if (bt_help(curbuf)) {
|
||||
fix_help_buffer();
|
||||
}
|
||||
} else if (read_stdin) {
|
||||
@@ -4930,6 +4930,12 @@ chk_modeline (
|
||||
return retval;
|
||||
}
|
||||
|
||||
// Return true if "buf" is a help buffer.
|
||||
bool bt_help(const buf_T *const buf)
|
||||
{
|
||||
return buf != NULL && buf->b_help;
|
||||
}
|
||||
|
||||
/*
|
||||
* Return special buffer name.
|
||||
* Returns NULL when the buffer has a normal file name.
|
||||
|
Reference in New Issue
Block a user