From 4b398413e46d604ec03e30875a46506988cdbbc0 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sun, 1 Nov 2020 12:17:45 -0500 Subject: vim-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. https://github.com/vim/vim/commit/388908352f88e7391accb3545b082db0fc89d9f7 --- src/nvim/testdir/test_mksession.vim | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/nvim/testdir') diff --git a/src/nvim/testdir/test_mksession.vim b/src/nvim/testdir/test_mksession.vim index 3243edbf55..215065f941 100644 --- a/src/nvim/testdir/test_mksession.vim +++ b/src/nvim/testdir/test_mksession.vim @@ -470,4 +470,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 -- cgit