diff options
author | matveyt <matthewtarasov@gmail.com> | 2022-01-05 14:01:30 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-01-05 14:01:30 +0000 |
commit | 8e7d9db32b53ca2b1cb7570d2042860bcd1e943f (patch) | |
tree | 551aa83a6dd768fcb79d40121eb3cf3f47d10493 /src/testdir/test_mksession.vim | |
parent | c653e4a2bd4099e2fac8e1c448a0f34581d5a658 (diff) | |
download | vim-git-8e7d9db32b53ca2b1cb7570d2042860bcd1e943f.tar.gz |
patch 8.2.4007: session does not restore help buffer properlyv8.2.4007
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)
Diffstat (limited to 'src/testdir/test_mksession.vim')
-rw-r--r-- | src/testdir/test_mksession.vim | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/testdir/test_mksession.vim b/src/testdir/test_mksession.vim index a0a2cb461..301ff0514 100644 --- 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 |