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)
diff --git a/src/testdir/test_window_cmd.vim b/src/testdir/test_window_cmd.vim
index af7c63a..68c44a0 100644
--- a/src/testdir/test_window_cmd.vim
+++ b/src/testdir/test_window_cmd.vim
@@ -1358,4 +1358,38 @@
   %bw!
 endfunc
 
+func Test_window_minimal_size()
+  set winminwidth=0 winminheight=0
+
+  " check size is fixed vertically
+  new
+  call win_execute(win_getid(2), 'wincmd _')
+  call assert_equal(0, winheight(0))
+  call feedkeys('0', 'tx')
+  call assert_equal(1, winheight(0))
+  bwipe!
+
+  " check size is fixed horizontally
+  vert new
+  call win_execute(win_getid(2), 'wincmd |')
+  call assert_equal(0, winwidth(0))
+  call feedkeys('0', 'tx')
+  call assert_equal(1, winwidth(0))
+  bwipe!
+
+  if has('timers')
+    " check size is fixed in Insert mode
+    new
+    call timer_start(100, {_ -> win_execute(win_getid(2), 'wincmd _')})
+    call timer_start(200, {_ -> assert_equal(0, winheight(0))})
+    call timer_start(300, {_ -> feedkeys(" \<Esc>", 't!')})
+    call feedkeys('a', 'tx!')
+    call assert_equal(1, winheight(0))
+    bwipe!
+  endif
+
+  set winminwidth& winminheight&
+endfunc
+
+
 " vim: shiftwidth=2 sts=2 expandtab