func Test_setbufvar_options() " This tests that aucmd_prepbuf() and aucmd_restbuf() properly restore the " window layout. call assert_equal(1, winnr('$')) split dummy_preview resize 2 set winfixheight winfixwidth let prev_id = win_getid() wincmd j let wh = winheight('.') let dummy_buf = bufnr('dummy_buf1', v:true) call setbufvar(dummy_buf, '&buftype', 'nofile') execute 'belowright vertical split #' . dummy_buf call assert_equal(wh, winheight('.')) let dum1_id = win_getid() wincmd h let wh = winheight('.') let dummy_buf = bufnr('dummy_buf2', v:true) call setbufvar(dummy_buf, '&buftype', 'nofile') execute 'belowright vertical split #' . dummy_buf call assert_equal(wh, winheight('.')) bwipe! call win_gotoid(prev_id) bwipe! call win_gotoid(dum1_id) bwipe! endfunc