aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-11-01 12:17:45 -0500
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-11-01 12:21:52 -0500
commit4b398413e46d604ec03e30875a46506988cdbbc0 (patch)
treecfaecb4b0691836eb4807ab32e1697813de9c72e /src/nvim/testdir
parentff112478379274ecfab54ad4f981b88804948aca (diff)
downloadrneovim-4b398413e46d604ec03e30875a46506988cdbbc0.tar.gz
rneovim-4b398413e46d604ec03e30875a46506988cdbbc0.tar.bz2
rneovim-4b398413e46d604ec03e30875a46506988cdbbc0.zip
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
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_mksession.vim13
1 files changed, 13 insertions, 0 deletions
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