@@ -17,7 +17,7 @@ func Test_window_cmd_ls0_with_split()
1717endfunc
1818
1919func Test_window_cmd_cmdwin_with_vsp ()
20- let efmt= ' Expected 0 but got %d (in ls=%d, %s window)'
20+ let efmt = ' Expected 0 but got %d (in ls=%d, %s window)'
2121 for v in range (0 , 2 )
2222 exec " set ls=" . v
2323 vsplit
@@ -444,21 +444,21 @@ func Test_window_contents()
444444
445445 exe " norm! \<C-W> t\<C-W> =1Gzt\<C-W> w\<C-W> +"
446446 redraw
447- let s3= GetScreenStr (1 )
447+ let s3 = GetScreenStr (1 )
448448 wincmd p
449449 call assert_equal (1 , line (" w0" ))
450450 call assert_equal (' 1 ' , s3)
451451
452452 exe " norm! \<C-W> t\<C-W> =50Gzt\<C-W> w\<C-W> +"
453453 redraw
454- let s3= GetScreenStr (1 )
454+ let s3 = GetScreenStr (1 )
455455 wincmd p
456456 call assert_equal (50 , line (" w0" ))
457457 call assert_equal (' 50 ' , s3)
458458
459459 exe " norm! \<C-W> t\<C-W> =59Gzt\<C-W> w\<C-W> +"
460460 redraw
461- let s3= GetScreenStr (1 )
461+ let s3 = GetScreenStr (1 )
462462 wincmd p
463463 call assert_equal (59 , line (" w0" ))
464464 call assert_equal (' 59 ' , s3)
@@ -507,4 +507,19 @@ func Test_visual_cleared_after_window_split()
507507 bwipe!
508508endfunc
509509
510+ func Test_winrestcmd ()
511+ 2 split
512+ 3 vsplit
513+ let a = winrestcmd ()
514+ call assert_equal (2 , winheight (0 ))
515+ call assert_equal (3 , winwidth (0 ))
516+ wincmd =
517+ call assert_notequal (2 , winheight (0 ))
518+ call assert_notequal (3 , winwidth (0 ))
519+ exe a
520+ call assert_equal (2 , winheight (0 ))
521+ call assert_equal (3 , winwidth (0 ))
522+ only
523+ endfunc
524+
510525" vim: shiftwidth = 2 sts = 2 expandtab
0 commit comments