diff options
author | Bram Moolenaar <Bram@vim.org> | 2018-08-23 22:20:35 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2018-08-23 22:20:35 +0200 |
commit | 7cb33a14c943c0b87dc61c1da438a443f8a43782 (patch) | |
tree | b6ff2caa1d59fc3111a8b49761f24a0199046b12 /src/testdir/test_options.vim | |
parent | 4edfe2d2a2d70ea66a7f73e9b923c2d1f6246a57 (diff) | |
download | vim-git-7cb33a14c943c0b87dc61c1da438a443f8a43782.tar.gz |
patch 8.1.0322: Test_copy_winopt() does not restore 'hidden'v8.1.0322
Problem: Test_copy_winopt() does not restore 'hidden'.
Solution: Restore the option, fix indent. (Ozaki Kiichi, closes #3367)
Diffstat (limited to 'src/testdir/test_options.vim')
-rw-r--r-- | src/testdir/test_options.vim | 100 |
1 files changed, 51 insertions, 49 deletions
diff --git a/src/testdir/test_options.vim b/src/testdir/test_options.vim index 2d4a97aa1..f34168228 100644 --- a/src/testdir/test_options.vim +++ b/src/testdir/test_options.vim @@ -350,55 +350,57 @@ func Test_backupskip() endfunc func Test_copy_winopt() - set hidden - - " Test copy option from current buffer in window - split - enew - setlocal numberwidth=5 - wincmd w - call assert_equal(4,&numberwidth) - bnext - call assert_equal(5,&numberwidth) - bw! - call assert_equal(4,&numberwidth) - - " Test copy value from window that used to be display the buffer - split - enew - setlocal numberwidth=6 - bnext - wincmd w - call assert_equal(4,&numberwidth) - bnext - call assert_equal(6,&numberwidth) - bw! - - " Test that if buffer is current, don't use the stale cached value - " from the last time the buffer was displayed. - split - enew - setlocal numberwidth=7 - bnext - bnext - setlocal numberwidth=8 - wincmd w - call assert_equal(4,&numberwidth) - bnext - call assert_equal(8,&numberwidth) - bw! - - " Test value is not copied if window already has seen the buffer - enew - split - setlocal numberwidth=9 - bnext - setlocal numberwidth=10 - wincmd w - call assert_equal(4,&numberwidth) - bnext - call assert_equal(4,&numberwidth) - bw! + set hidden + + " Test copy option from current buffer in window + split + enew + setlocal numberwidth=5 + wincmd w + call assert_equal(4,&numberwidth) + bnext + call assert_equal(5,&numberwidth) + bw! + call assert_equal(4,&numberwidth) + + " Test copy value from window that used to be display the buffer + split + enew + setlocal numberwidth=6 + bnext + wincmd w + call assert_equal(4,&numberwidth) + bnext + call assert_equal(6,&numberwidth) + bw! + + " Test that if buffer is current, don't use the stale cached value + " from the last time the buffer was displayed. + split + enew + setlocal numberwidth=7 + bnext + bnext + setlocal numberwidth=8 + wincmd w + call assert_equal(4,&numberwidth) + bnext + call assert_equal(8,&numberwidth) + bw! + + " Test value is not copied if window already has seen the buffer + enew + split + setlocal numberwidth=9 + bnext + setlocal numberwidth=10 + wincmd w + call assert_equal(4,&numberwidth) + bnext + call assert_equal(4,&numberwidth) + bw! + + set hidden& endfunc func Test_shortmess_F() |