Mercurial > vim
comparison 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 |
comparison
equal
deleted
inserted
replaced
22775:a3e03821096a | 22776:0583f3e2c12e |
---|---|
857 | 857 |
858 call s:ClearMappings() | 858 call s:ClearMappings() |
859 call delete('Xtestvimrc') | 859 call delete('Xtestvimrc') |
860 endfunc | 860 endfunc |
861 | 861 |
862 func Test_scrolloff() | |
863 set sessionoptions+=localoptions | |
864 setlocal so=1 siso=1 | |
865 mksession! Xtest_mks.out | |
866 setlocal so=-1 siso=-1 | |
867 source Xtest_mks.out | |
868 call assert_equal(1, &l:so) | |
869 call assert_equal(1, &l:siso) | |
870 call delete('Xtest_mks.out') | |
871 setlocal so& siso& | |
872 set sessionoptions& | |
873 endfunc | |
874 | |
862 " vim: shiftwidth=2 sts=2 expandtab | 875 " vim: shiftwidth=2 sts=2 expandtab |