Mercurial > vim
diff src/testdir/test_mksession.vim @ 24464:a56f9c2ba51c v8.2.2772
patch 8.2.2772: problems when restoring 'runtimepath' from a session file
Commit: https://github.com/vim/vim/commit/635bd60804966803490287e97460ecdc91d5fe0a
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Apr 16 19:58:22 2021 +0200
patch 8.2.2772: problems when restoring 'runtimepath' from a session file
Problem: Problems when restoring 'runtimepath' from a session file.
Solution: Add the "skiprtp" item in 'sessionoptions'.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 16 Apr 2021 20:00:05 +0200 |
parents | 3f96a5dc0c53 |
children | b2484fa6cb02 |
line wrap: on
line diff
--- a/src/testdir/test_mksession.vim +++ b/src/testdir/test_mksession.vim @@ -131,6 +131,32 @@ func Test_mksession() set sessionoptions& endfunc +def Test_mksession_skiprtp() + mksession! Xtest_mks.out + var found = 0 + for line in readfile('Xtest_mks.out') + if line =~ 'set runtimepath' + found = 1 + break + endif + endfor + assert_equal(1, found) + delete('Xtest_mks.out') + + set sessionoptions+=skiprtp + mksession! Xtest_mks.out + found = 0 + for line in readfile('Xtest_mks.out') + if line =~ 'set runtimepath' + found = 1 + break + endif + endfor + assert_equal(0, found) + delete('Xtest_mks.out') + set sessionoptions& +enddef + func Test_mksession_winheight() new set winheight=10