patch 8.2.2545: errors and crash when terminal window is zero height

Problem:    Errors and crash when terminal window is zero height. (Leonid V.
            Fedorenchik)
Solution:   Do not resize when width or height is zero. (closes #7890)
diff --git a/src/testdir/test_terminal.vim b/src/testdir/test_terminal.vim
index 9024171..3def03d 100644
--- a/src/testdir/test_terminal.vim
+++ b/src/testdir/test_terminal.vim
@@ -470,6 +470,19 @@
   call delete('Xtext')
 endfunc
 
+func Test_terminal_zero_height()
+  split
+  wincmd j
+  anoremenu 1.1 WinBar.test :
+  terminal ++curwin
+  wincmd k
+  wincmd _
+  redraw
+
+  call term_sendkeys(bufnr(), "exit\r")
+  bwipe!
+endfunc
+
 func Test_terminal_curwin()
   let cmd = Get_cat_123_cmd()
   call assert_equal(1, winnr('$'))