patch 9.0.0670: no space for command line when there is a tabline

Problem:    No space for command line when there is a tabline.
Solution:   Correct computation of where the command line should be.
            (closes #11295)
diff --git a/src/testdir/dumps/Test_cmdheight_tabline_1.dump b/src/testdir/dumps/Test_cmdheight_tabline_1.dump
new file mode 100644
index 0000000..7260309
--- /dev/null
+++ b/src/testdir/dumps/Test_cmdheight_tabline_1.dump
@@ -0,0 +1,6 @@
+| +2&#ffffff0|[|N|o| |N|a|m|e|]| | +1&&@63
+> +0&&@74
+|~+0#4040ff13&| @73
+|~| @73
+|[+3#0000000&|N|o| |N|a|m|e|]| @47|0|,|0|-|1| @9|A|l@1
+| +0&&@74
diff --git a/src/testdir/test_cmdline.vim b/src/testdir/test_cmdline.vim
index 3cfdd76..f27b091 100644
--- a/src/testdir/test_cmdline.vim
+++ b/src/testdir/test_cmdline.vim
@@ -287,6 +287,16 @@
   call StopVimInTerminal(buf)
 endfunc
 
+func Test_cmdheight_tabline()
+  CheckScreendump
+
+  let buf = RunVimInTerminal('-c "set ls=2" -c "set stal=2" -c "set cmdheight=1"', {'rows': 6})
+  call VerifyScreenDump(buf, 'Test_cmdheight_tabline_1', {})
+
+  " clean up
+  call StopVimInTerminal(buf)
+endfunc
+
 func Test_map_completion()
   call feedkeys(":map <unique> <si\<Tab>\<Home>\"\<CR>", 'xt')
   call assert_equal('"map <unique> <silent>', getreg(':'))