aboutsummaryrefslogtreecommitdiff
path: root/test/old/testdir/test_options.vim
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-06-28 08:13:14 +0800
committerGitHub <noreply@github.com>2023-06-28 08:13:14 +0800
commit42f9573e5da64d6eb8e0dd9ccfefadb68773202c (patch)
tree1624f36a2d92f73ee68073c4b7dca744ba864a01 /test/old/testdir/test_options.vim
parente85e7fc7bcccfa3b8f9e52ec4d6cb21591b50468 (diff)
downloadrneovim-42f9573e5da64d6eb8e0dd9ccfefadb68773202c.tar.gz
rneovim-42f9573e5da64d6eb8e0dd9ccfefadb68773202c.tar.bz2
rneovim-42f9573e5da64d6eb8e0dd9ccfefadb68773202c.zip
vim-patch:9.0.1670: resetting local option to global value is inconsistent (#24185)
Problem: Resetting local option to global value is inconsistent. Solution: Handle "<" specifically for 'scrolloff' and 'sidescrolloff'. (closes vim/vim#12594) https://github.com/vim/vim/commit/bf5f189e449d6517239b79804d7a422a46946838 Co-authored-by: Bram Moolenaar <Bram@vim.org>
Diffstat (limited to 'test/old/testdir/test_options.vim')
-rw-r--r--test/old/testdir/test_options.vim12
1 files changed, 10 insertions, 2 deletions
diff --git a/test/old/testdir/test_options.vim b/test/old/testdir/test_options.vim
index 5a30fbbb16..6390b9c37a 100644
--- a/test/old/testdir/test_options.vim
+++ b/test/old/testdir/test_options.vim
@@ -939,12 +939,16 @@ func Test_local_scrolloff()
wincmd w
call assert_equal(5, &so)
wincmd w
+ call assert_equal(3, &so)
setlocal so<
call assert_equal(5, &so)
+ setglob so=8
+ call assert_equal(8, &so)
+ call assert_equal(-1, &l:so)
setlocal so=0
call assert_equal(0, &so)
setlocal so=-1
- call assert_equal(5, &so)
+ call assert_equal(8, &so)
call assert_equal(7, &siso)
setlocal siso=3
@@ -952,12 +956,16 @@ func Test_local_scrolloff()
wincmd w
call assert_equal(7, &siso)
wincmd w
+ call assert_equal(3, &siso)
setlocal siso<
call assert_equal(7, &siso)
+ setglob siso=4
+ call assert_equal(4, &siso)
+ call assert_equal(-1, &l:siso)
setlocal siso=0
call assert_equal(0, &siso)
setlocal siso=-1
- call assert_equal(7, &siso)
+ call assert_equal(4, &siso)
close
set so&