Mercurial > vim
diff src/buffer.c @ 11800:5ceaecedbad2 v8.0.0782
patch 8.0.0782: using freed memory in quickfix code
commit https://github.com/vim/vim/commit/d28cc3f55d4a5a980f6ac6fa682382822a223720
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Jul 27 22:03:50 2017 +0200
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)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Thu, 27 Jul 2017 22:15:03 +0200 |
parents | 77bf0346687e |
children | 0cfe4a07c2ad |
line wrap: on
line diff
--- a/src/buffer.c +++ b/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) @@ -5669,6 +5669,15 @@ bt_terminal(buf_T *buf) } /* + * 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. */