mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:8.0.0331
Problem: Restoring help snapshot accesses freed memory. (Dominique Pelle)
Solution: Don't restore a snapshot when the window closes.
343b8c0429
This commit is contained in:
parent
54f31187ba
commit
41bffeacff
16
src/nvim/testdir/test_help.vim
Normal file
16
src/nvim/testdir/test_help.vim
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
|
||||||
|
" Tests for :help
|
||||||
|
|
||||||
|
func Test_help_restore_snapshot()
|
||||||
|
help
|
||||||
|
set buftype=
|
||||||
|
help
|
||||||
|
edit x
|
||||||
|
help
|
||||||
|
helpclose
|
||||||
|
endfunc
|
||||||
|
|
||||||
|
func Test_help_errors()
|
||||||
|
call assert_fails('help doesnotexist', 'E149:')
|
||||||
|
call assert_fails('help!', 'E478:')
|
||||||
|
endfunc
|
@ -5365,10 +5365,8 @@ restore_snapshot (
|
|||||||
clear_snapshot(curtab, idx);
|
clear_snapshot(curtab, idx);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/// Check if frames "sn" and "fr" have the same layout, same following frames
|
||||||
* Check if frames "sn" and "fr" have the same layout, same following frames
|
/// and same children. And the window pointer is valid.
|
||||||
* and same children.
|
|
||||||
*/
|
|
||||||
static int check_snapshot_rec(frame_T *sn, frame_T *fr)
|
static int check_snapshot_rec(frame_T *sn, frame_T *fr)
|
||||||
{
|
{
|
||||||
if (sn->fr_layout != fr->fr_layout
|
if (sn->fr_layout != fr->fr_layout
|
||||||
|
Loading…
Reference in New Issue
Block a user