Mercurial > vim
comparison 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 |
comparison
equal
deleted
inserted
replaced
24463:754a22f6d5bc | 24464:a56f9c2ba51c |
---|---|
129 call delete(tmpfile) | 129 call delete(tmpfile) |
130 let &wrap = wrap_save | 130 let &wrap = wrap_save |
131 set sessionoptions& | 131 set sessionoptions& |
132 endfunc | 132 endfunc |
133 | 133 |
134 def Test_mksession_skiprtp() | |
135 mksession! Xtest_mks.out | |
136 var found = 0 | |
137 for line in readfile('Xtest_mks.out') | |
138 if line =~ 'set runtimepath' | |
139 found = 1 | |
140 break | |
141 endif | |
142 endfor | |
143 assert_equal(1, found) | |
144 delete('Xtest_mks.out') | |
145 | |
146 set sessionoptions+=skiprtp | |
147 mksession! Xtest_mks.out | |
148 found = 0 | |
149 for line in readfile('Xtest_mks.out') | |
150 if line =~ 'set runtimepath' | |
151 found = 1 | |
152 break | |
153 endif | |
154 endfor | |
155 assert_equal(0, found) | |
156 delete('Xtest_mks.out') | |
157 set sessionoptions& | |
158 enddef | |
159 | |
134 func Test_mksession_winheight() | 160 func Test_mksession_winheight() |
135 new | 161 new |
136 set winheight=10 | 162 set winheight=10 |
137 set winminheight=2 | 163 set winminheight=2 |
138 mksession! Xtest_mks.out | 164 mksession! Xtest_mks.out |