comparison src/testdir/test_window_cmd.vim @ 26468:2fc13817b100 v8.2.3764

patch 8.2.3764: cannot see any text when window was made zero lines Commit: https://github.com/vim/vim/commit/d0fb907253a5c5a71b1f231f3ddec24098fb4e21 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Dec 9 11:57:22 2021 +0000 patch 8.2.3764: cannot see any text when window was made zero lines Problem: Cannot see any text when window was made zero lines or zero columns. Solution: Ensure there is at least one line and column. (fixes #9307)
author Bram Moolenaar <Bram@vim.org>
date Thu, 09 Dec 2021 13:00:06 +0100
parents 4c1b6f3eb96b
children bea106f5fd26
comparison
equal deleted inserted replaced
26467:25348fc7dfb6 26468:2fc13817b100
1356 augroup END 1356 augroup END
1357 augroup! T1 1357 augroup! T1
1358 %bw! 1358 %bw!
1359 endfunc 1359 endfunc
1360 1360
1361 func Test_window_minimal_size()
1362 set winminwidth=0 winminheight=0
1363
1364 " check size is fixed vertically
1365 new
1366 call win_execute(win_getid(2), 'wincmd _')
1367 call assert_equal(0, winheight(0))
1368 call feedkeys('0', 'tx')
1369 call assert_equal(1, winheight(0))
1370 bwipe!
1371
1372 " check size is fixed horizontally
1373 vert new
1374 call win_execute(win_getid(2), 'wincmd |')
1375 call assert_equal(0, winwidth(0))
1376 call feedkeys('0', 'tx')
1377 call assert_equal(1, winwidth(0))
1378 bwipe!
1379
1380 if has('timers')
1381 " check size is fixed in Insert mode
1382 new
1383 call timer_start(100, {_ -> win_execute(win_getid(2), 'wincmd _')})
1384 call timer_start(200, {_ -> assert_equal(0, winheight(0))})
1385 call timer_start(300, {_ -> feedkeys(" \<Esc>", 't!')})
1386 call feedkeys('a', 'tx!')
1387 call assert_equal(1, winheight(0))
1388 bwipe!
1389 endif
1390
1391 set winminwidth& winminheight&
1392 endfunc
1393
1394
1361 " vim: shiftwidth=2 sts=2 expandtab 1395 " vim: shiftwidth=2 sts=2 expandtab