updated for version 7.1-119
diff --git a/src/option.c b/src/option.c
index 59a2fa3..0bdc0a4 100644
--- a/src/option.c
+++ b/src/option.c
@@ -7824,6 +7824,8 @@
 	    errmsg = e_positive;
 	    p_ch = 1;
 	}
+	if (p_ch > Rows - min_rows() + 1)
+	    p_ch = Rows - min_rows() + 1;
 
 	/* Only compute the new window layout when startup has been
 	 * completed. Otherwise the frame sizes may be wrong. */
diff --git a/src/version.c b/src/version.c
index 9a40b66..343ae3d 100644
--- a/src/version.c
+++ b/src/version.c
@@ -667,6 +667,8 @@
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    119,
+/**/
     118,
 /**/
     117,
diff --git a/src/window.c b/src/window.c
index 62a39d5..95f4a24 100644
--- a/src/window.c
+++ b/src/window.c
@@ -5523,6 +5523,7 @@
 		{
 		    EMSG(_(e_noroom));
 		    p_ch = old_p_ch;
+		    curtab->tp_ch_used = p_ch;
 		    cmdline_row = Rows - p_ch;
 		    break;
 		}