To: vim_dev@googlegroups.com Subject: Patch 8.0.1811 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.0.1811 Problem: No test for winrestcmd(). Solution: Add a test. (Dominique Pelle, closes #2894) Files: src/testdir/test_window_cmd.vim *** ../vim-8.0.1810/src/testdir/test_window_cmd.vim 2018-04-13 20:41:24.856374986 +0200 --- src/testdir/test_window_cmd.vim 2018-05-10 18:19:36.478770626 +0200 *************** *** 17,23 **** endfunc func Test_window_cmd_cmdwin_with_vsp() ! let efmt='Expected 0 but got %d (in ls=%d, %s window)' for v in range(0, 2) exec "set ls=" . v vsplit --- 17,23 ---- endfunc func Test_window_cmd_cmdwin_with_vsp() ! let efmt = 'Expected 0 but got %d (in ls=%d, %s window)' for v in range(0, 2) exec "set ls=" . v vsplit *************** *** 444,464 **** exe "norm! \t\=1Gzt\w\+" redraw ! let s3=GetScreenStr(1) wincmd p call assert_equal(1, line("w0")) call assert_equal('1 ', s3) exe "norm! \t\=50Gzt\w\+" redraw ! let s3=GetScreenStr(1) wincmd p call assert_equal(50, line("w0")) call assert_equal('50 ', s3) exe "norm! \t\=59Gzt\w\+" redraw ! let s3=GetScreenStr(1) wincmd p call assert_equal(59, line("w0")) call assert_equal('59 ', s3) --- 444,464 ---- exe "norm! \t\=1Gzt\w\+" redraw ! let s3 = GetScreenStr(1) wincmd p call assert_equal(1, line("w0")) call assert_equal('1 ', s3) exe "norm! \t\=50Gzt\w\+" redraw ! let s3 = GetScreenStr(1) wincmd p call assert_equal(50, line("w0")) call assert_equal('50 ', s3) exe "norm! \t\=59Gzt\w\+" redraw ! let s3 = GetScreenStr(1) wincmd p call assert_equal(59, line("w0")) call assert_equal('59 ', s3) *************** *** 507,510 **** --- 507,525 ---- bwipe! endfunc + func Test_winrestcmd() + 2split + 3vsplit + let a = 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 + call assert_equal(2, winheight(0)) + call assert_equal(3, winwidth(0)) + only + endfunc + " vim: shiftwidth=2 sts=2 expandtab *** ../vim-8.0.1810/src/version.c 2018-05-10 18:05:52.545048437 +0200 --- src/version.c 2018-05-10 18:22:38.573473480 +0200 *************** *** 763,764 **** --- 763,766 ---- { /* Add new patch number below this line */ + /**/ + 1811, /**/ -- Two cows are standing together in a field. One asks the other: "So what do you think about this Mad Cow Disease?" The other replies: "That doesn't concern me. I'm a helicopter." /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///