diff src/testdir/test_mksession.vim @ 22776:0583f3e2c12e v8.2.1936

patch 8.2.1936: session sets the local 'scrolloff' value to the global value Commit: https://github.com/vim/vim/commit/388908352f88e7391accb3545b082db0fc89d9f7 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Nov 1 17:40:54 2020 +0100 patch 8.2.1936: session sets the local 'scrolloff' value to the global value Problem: Session sets the local 'scrolloff' value to the global value. Solution: Do not let restoring the global option value change the local value.
author Bram Moolenaar <Bram@vim.org>
date Sun, 01 Nov 2020 17:45:04 +0100
parents 0bbc8be90207
children 4384c44c031a
line wrap: on
line diff
--- a/src/testdir/test_mksession.vim
+++ b/src/testdir/test_mksession.vim
@@ -859,4 +859,17 @@ func Test_mkvimrc()
   call delete('Xtestvimrc')
 endfunc
 
+func Test_scrolloff()
+  set sessionoptions+=localoptions
+  setlocal so=1 siso=1
+  mksession! Xtest_mks.out
+  setlocal so=-1 siso=-1
+  source Xtest_mks.out
+  call assert_equal(1, &l:so)
+  call assert_equal(1, &l:siso)
+  call delete('Xtest_mks.out')
+  setlocal so& siso&
+  set sessionoptions&
+endfunc
+
 " vim: shiftwidth=2 sts=2 expandtab