diff src/terminal.c @ 13304:013c44d9dc09 v8.0.1526

patch 8.0.1526: no test using a screen dump yet commit https://github.com/vim/vim/commit/da65058a9c4774dc534c7ae98d24c58b5db669fa Author: Bram Moolenaar <Bram@vim.org> Date: Tue Feb 20 15:51:40 2018 +0100 patch 8.0.1526: no test using a screen dump yet Problem: No test using a screen dump yet. Solution: Add a test for C syntax highlighting. Add helper functions.
author Christian Brabandt <cb@256bit.org>
date Tue, 20 Feb 2018 16:00:06 +0100
parents 803294329951
children 424321d6eea7
line wrap: on
line diff
--- a/src/terminal.c
+++ b/src/terminal.c
@@ -410,10 +410,13 @@ term_start(typval_T *argvar, jobopt_T *o
 
     if (!opt->jo_hidden)
     {
-	/* only one size was taken care of with :new, do the other one */
-	if (opt->jo_term_rows > 0 && (cmdmod.split & WSP_VERT))
+	/* Only one size was taken care of with :new, do the other one.  With
+	 * "curwin" both need to be done. */
+	if (opt->jo_term_rows > 0 && (opt->jo_curwin
+						 || (cmdmod.split & WSP_VERT)))
 	    win_setheight(opt->jo_term_rows);
-	if (opt->jo_term_cols > 0 && !(cmdmod.split & WSP_VERT))
+	if (opt->jo_term_cols > 0 && (opt->jo_curwin
+						|| !(cmdmod.split & WSP_VERT)))
 	    win_setwidth(opt->jo_term_cols);
     }