Mercurial > vim
changeset 14617:56ceaa0ad239 v8.1.0322
patch 8.1.0322: Test_copy_winopt() does not restore 'hidden'
commit https://github.com/vim/vim/commit/7cb33a14c943c0b87dc61c1da438a443f8a43782
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Aug 23 22:20:35 2018 +0200
patch 8.1.0322: Test_copy_winopt() does not restore 'hidden'
Problem: Test_copy_winopt() does not restore 'hidden'.
Solution: Restore the option, fix indent. (Ozaki Kiichi, closes https://github.com/vim/vim/issues/3367)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Thu, 23 Aug 2018 22:30:06 +0200 |
parents | 9cdbe847b184 |
children | 0c9c706da69a |
files | src/testdir/test_options.vim src/version.c |
diffstat | 2 files changed, 49 insertions(+), 45 deletions(-) [+] |
line wrap: on
line diff
--- 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 + 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 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 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 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! + " 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()