Mercurial > vim
comparison src/testdir/test_options.vim @ 15713:ad8b2c109b22 v8.1.0864
patch 8.1.0864: cannot have a local value for 'scrolloff' and 'sidescrolloff'
commit https://github.com/vim/vim/commit/375e3390078e740d3c83b0c118c50d9a920036c7
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Jan 31 18:26:10 2019 +0100
patch 8.1.0864: cannot have a local value for 'scrolloff' and 'sidescrolloff'
Problem: Cannot have a local value for 'scrolloff' and 'sidescrolloff'.
(Gary Holloway)
Solution: Make 'scrolloff' and 'sidescrolloff' global-local. (mostly by
Aron Widforss, closes #3539)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 31 Jan 2019 18:30:08 +0100 |
parents | a8ed064ed316 |
children | 676069de7214 |
comparison
equal
deleted
inserted
replaced
15712:bc1989f9bd37 | 15713:ad8b2c109b22 |
---|---|
481 call assert_match('file1', execute('bn', '')) | 481 call assert_match('file1', execute('bn', '')) |
482 call assert_match('file2', execute('bn', '')) | 482 call assert_match('file2', execute('bn', '')) |
483 bwipe | 483 bwipe |
484 bwipe | 484 bwipe |
485 endfunc | 485 endfunc |
486 | |
487 func Test_local_scrolloff() | |
488 set so=5 | |
489 set siso=7 | |
490 split | |
491 call assert_equal(5, &so) | |
492 setlocal so=3 | |
493 call assert_equal(3, &so) | |
494 wincmd w | |
495 call assert_equal(5, &so) | |
496 wincmd w | |
497 setlocal so< | |
498 call assert_equal(5, &so) | |
499 setlocal so=0 | |
500 call assert_equal(0, &so) | |
501 setlocal so=-1 | |
502 call assert_equal(5, &so) | |
503 | |
504 call assert_equal(7, &siso) | |
505 setlocal siso=3 | |
506 call assert_equal(3, &siso) | |
507 wincmd w | |
508 call assert_equal(7, &siso) | |
509 wincmd w | |
510 setlocal siso< | |
511 call assert_equal(7, &siso) | |
512 setlocal siso=0 | |
513 call assert_equal(0, &siso) | |
514 setlocal siso=-1 | |
515 call assert_equal(7, &siso) | |
516 | |
517 close | |
518 set so& | |
519 set siso& | |
520 endfunc |