File tree Expand file tree Collapse file tree 3 files changed +34
-1
lines changed
Expand file tree Collapse file tree 3 files changed +34
-1
lines changed Original file line number Diff line number Diff line change @@ -725,3 +725,34 @@ func Test_balloon_show()
725725 call balloon_show (' hi!' )
726726 endif
727727endfunc
728+
729+ func Test_setbufvar_options ()
730+ " This tests that aucmd_prepbuf() and aucmd_restbuf() properly restore the
731+ " window layout.
732+ call assert_equal (1 , winnr (' $' ))
733+ split dummy_preview
734+ resize 2
735+ set winfixheight winfixwidth
736+ let prev_id = win_getid ()
737+
738+ wincmd j
739+ let wh = winheight (' .' )
740+ let dummy_buf = bufnr (' dummy_buf1' , v: true )
741+ call setbufvar (dummy_buf, ' &buftype' , ' nofile' )
742+ execute ' belowright vertical split #' . dummy_buf
743+ call assert_equal (wh , winheight (' .' ))
744+ let dum1_id = win_getid ()
745+
746+ wincmd h
747+ let wh = winheight (' .' )
748+ let dummy_buf = bufnr (' dummy_buf2' , v: true )
749+ call setbufvar (dummy_buf, ' &buftype' , ' nofile' )
750+ execute ' belowright vertical split #' . dummy_buf
751+ call assert_equal (wh , winheight (' .' ))
752+
753+ bwipe!
754+ call win_gotoid (prev_id)
755+ bwipe!
756+ call win_gotoid (dum1_id)
757+ bwipe!
758+ endfunc
Original file line number Diff line number Diff line change @@ -764,6 +764,8 @@ static char *(features[]) =
764764
765765static int included_patches [] =
766766{ /* Add new patch number below this line */
767+ /**/
768+ 482 ,
767769/**/
768770 481 ,
769771/**/
Original file line number Diff line number Diff line change @@ -6563,7 +6563,7 @@ check_snapshot_rec(frame_T *sn, frame_T *fr)
65636563 && check_snapshot_rec (sn -> fr_next , fr -> fr_next ) == FAIL )
65646564 || (sn -> fr_child != NULL
65656565 && check_snapshot_rec (sn -> fr_child , fr -> fr_child ) == FAIL )
6566- || ! win_valid (sn -> fr_win ))
6566+ || ( sn -> fr_win != NULL && ! win_valid (sn -> fr_win ) ))
65676567 return FAIL ;
65686568 return OK ;
65696569}
You can’t perform that action at this time.
0 commit comments