diff options
author | Jan Edmund Lazo <janedmundlazo@hotmail.com> | 2018-09-06 05:08:15 -0400 |
---|---|---|
committer | Jan Edmund Lazo <janedmundlazo@hotmail.com> | 2018-09-06 06:15:35 -0400 |
commit | dc15dcffadca790a7b274110c0b356dcc22dfb82 (patch) | |
tree | afe67cd235b58667aa05105c57a3a778075cbec2 /src/nvim/buffer.c | |
parent | bb519fb261edf03be28f1a9150bdba58ed9d241e (diff) | |
download | rneovim-dc15dcffadca790a7b274110c0b356dcc22dfb82.tar.gz rneovim-dc15dcffadca790a7b274110c0b356dcc22dfb82.tar.bz2 rneovim-dc15dcffadca790a7b274110c0b356dcc22dfb82.zip |
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)
https://github.com/vim/vim/commit/d28cc3f55d4a5a980f6ac6fa682382822a223720
Diffstat (limited to 'src/nvim/buffer.c')
-rw-r--r-- | src/nvim/buffer.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c index 64569c294b..9815063633 100644 --- a/src/nvim/buffer.c +++ b/src/nvim/buffer.c @@ -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. |