diff options
| author | Jan Edmund Lazo <janedmundlazo@hotmail.com> | 2018-08-21 22:18:15 -0400 |
|---|---|---|
| committer | Jan Edmund Lazo <janedmundlazo@hotmail.com> | 2018-08-21 22:36:31 -0400 |
| commit | 54e6ef73f058f3e3a340addd6354cf70e2fd11b7 (patch) | |
| tree | d5d8f0e2dd316c47f3b5cd66f56ebf4aa4efe432 /src/nvim/testdir | |
| parent | b5fc21dbf05874ef7901a5e66f39612c46a698e3 (diff) | |
| download | rneovim-54e6ef73f058f3e3a340addd6354cf70e2fd11b7.tar.gz rneovim-54e6ef73f058f3e3a340addd6354cf70e2fd11b7.tar.bz2 rneovim-54e6ef73f058f3e3a340addd6354cf70e2fd11b7.zip | |
vim-patch:8.0.1790: 'winfixwidth' is not always respected by :close
Problem: 'winfixwidth' is not always respected by :close.
Solution: Prefer a frame without 'winfixwidth' or 'winfixheight'. (Jason
Franklin)
https://github.com/vim/vim/commit/c136af29c0b1939076fbae7d36afd90dce740315
Diffstat (limited to 'src/nvim/testdir')
| -rw-r--r-- | src/nvim/testdir/test_winbuf_close.vim | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_winbuf_close.vim b/src/nvim/testdir/test_winbuf_close.vim index ed64dd79b7..e4618610cd 100644 --- a/src/nvim/testdir/test_winbuf_close.vim +++ b/src/nvim/testdir/test_winbuf_close.vim @@ -122,3 +122,39 @@ func Test_winbuf_close() call delete('Xtest2') call delete('Xtest3') endfunc + +" Test that ":close" will respect 'winfixheight' when possible. +func Test_winfixheight_on_close() + set nosplitbelow nosplitright + + split | split | vsplit + + $wincmd w + setlocal winfixheight + let l:height = winheight(0) + + 3close + + call assert_equal(l:height, winheight(0)) + + %bwipeout! + setlocal nowinfixheight splitbelow& splitright& +endfunc + +" Test that ":close" will respect 'winfixwidth' when possible. +func Test_winfixwidth_on_close() + set nosplitbelow nosplitright + + vsplit | vsplit | split + + $wincmd w + setlocal winfixwidth + let l:width = winwidth(0) + + 3close + + call assert_equal(l:width, winwidth(0)) + + %bwipeout! + setlocal nowinfixwidth splitbelow& splitright& +endfunction |