Mercurial > vim
diff src/testdir/test_mksession.vim @ 26956:86f8718c643d v8.2.4007
patch 8.2.4007: session does not restore help buffer properly
Commit: https://github.com/vim/vim/commit/8e7d9db32b53ca2b1cb7570d2042860bcd1e943f
Author: matveyt <matthewtarasov@gmail.com>
Date: Wed Jan 5 14:01:30 2022 +0000
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 #9475,
closes #9458, closes #9472)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 05 Jan 2022 15:15:03 +0100 |
parents | 4c1b6f3eb96b |
children | 4fd87205ca80 |
line wrap: on
line diff
--- a/src/testdir/test_mksession.vim +++ b/src/testdir/test_mksession.vim @@ -909,6 +909,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() " Only applicable in GUI Vim