aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2021-03-20 23:18:40 -0400
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2021-03-21 00:26:42 -0400
commit749a8b6be767ee3e4dfd83af72973b386ac5ead1 (patch)
treeb40060f352ecf809aa42e455f5998c39c9bdff82 /src/nvim/testdir
parent0bf9f10da08d4eaf3e7957136a6bfb9e505720b8 (diff)
downloadrneovim-749a8b6be767ee3e4dfd83af72973b386ac5ead1.tar.gz
rneovim-749a8b6be767ee3e4dfd83af72973b386ac5ead1.tar.bz2
rneovim-749a8b6be767ee3e4dfd83af72973b386ac5ead1.zip
vim-patch:8.2.2631: commands from winrestcmd() do not always work properly
Problem: Commands from winrestcmd() do not always work properly. (Leonid V. Fedorenchik) Solution: Repeat the size commands twice. (closes vim/vim#7988) https://github.com/vim/vim/commit/a0c8aea479ca055ce43ba2984a9933f6c48e6161
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_window_cmd.vim17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/nvim/testdir/test_window_cmd.vim b/src/nvim/testdir/test_window_cmd.vim
index 86682cca4f..a522705238 100644
--- a/src/nvim/testdir/test_window_cmd.vim
+++ b/src/nvim/testdir/test_window_cmd.vim
@@ -550,16 +550,29 @@ endfunc
func Test_winrestcmd()
2split
3vsplit
- let a = winrestcmd()
+ let restcmd = winrestcmd()
call assert_equal(2, winheight(0))
call assert_equal(3, winwidth(0))
wincmd =
call assert_notequal(2, winheight(0))
call assert_notequal(3, winwidth(0))
- exe a
+ exe restcmd
call assert_equal(2, winheight(0))
call assert_equal(3, winwidth(0))
only
+
+ wincmd v
+ wincmd s
+ wincmd v
+ redraw
+ let restcmd = winrestcmd()
+ wincmd _
+ wincmd |
+ exe restcmd
+ redraw
+ call assert_equal(restcmd, winrestcmd())
+
+ only
endfunc
function! Fun_RenewFile()