diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-01-06 09:29:13 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2022-01-07 13:39:52 +0800 |
commit | aa5adef969f5f1ffcc3867200211fa236b569ae3 (patch) | |
tree | e45e1b7a4a7ea27caf8d38a51752706aaadbd04a /src/nvim/testdir | |
parent | e58071c92c98fa54fcb29ab87ac6de7c02ede27b (diff) | |
download | rneovim-aa5adef969f5f1ffcc3867200211fa236b569ae3.tar.gz rneovim-aa5adef969f5f1ffcc3867200211fa236b569ae3.tar.bz2 rneovim-aa5adef969f5f1ffcc3867200211fa236b569ae3.zip |
vim-patch:8.2.4007: session does not restore help buffer properly
Problem: Session does not restore help buffer properly when "options' is
missing from 'sessionoptions'.
Solution: Use a ":help" command to create the help window. (closes vim/vim#9475,
closes vim/vim#9458, closes vim/vim#9472)
https://github.com/vim/vim/commit/8e7d9db32b53ca2b1cb7570d2042860bcd1e943f
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r-- | src/nvim/testdir/test_mksession.vim | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_mksession.vim b/src/nvim/testdir/test_mksession.vim index 057895047d..a87691abf9 100644 --- a/src/nvim/testdir/test_mksession.vim +++ b/src/nvim/testdir/test_mksession.vim @@ -696,6 +696,36 @@ func Test_mksession_foldopt() set sessionoptions& endfunc +" Test for mksession with "help" but not "options" in 'sessionoptions' +func Test_mksession_help_noopt() + set sessionoptions-=options + set sessionoptions+=help + help + let fname = expand('%') + mksession! Xtest_mks.out + bwipe + + source Xtest_mks.out + call assert_equal('help', &buftype) + call assert_equal('help', &filetype) + call assert_equal(fname, expand('%')) + call assert_false(&modifiable) + call assert_true(&readonly) + + helpclose + help index + let fname = expand('%') + mksession! Xtest_mks.out + bwipe + + source Xtest_mks.out + call assert_equal('help', &buftype) + call assert_equal(fname, expand('%')) + + call delete('Xtest_mks.out') + set sessionoptions& +endfunc + " Test for mksession with window position func Test_mksession_winpos() if !has('gui_running') |