summaryrefslogtreecommitdiff
path: root/src/option.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-07-22 17:04:02 +0200
committerBram Moolenaar <Bram@vim.org>2017-07-22 17:04:02 +0200
commit825680f5f4ffed5d57fdb283dde5f0ad734605fc (patch)
treeddc79f2e8bd2be926d92b90111def111a25df5d1 /src/option.c
parent8f84c3a8666cea04484ec93fa05386bf33f93f5a (diff)
downloadvim-git-825680f5f4ffed5d57fdb283dde5f0ad734605fc.tar.gz
patch 8.0.0743: the 'termsize' option can be set to an invalid valuev8.0.0743
Problem: The 'termsize' option can be set to an invalid value. Solution: Check the 'termsize' option to be valid.
Diffstat (limited to 'src/option.c')
-rw-r--r--src/option.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/option.c b/src/option.c
index 8e91fae74..524789371 100644
--- a/src/option.c
+++ b/src/option.c
@@ -7479,6 +7479,19 @@ did_set_string_option(
}
#endif
+#ifdef FEAT_TERMINAL
+ /* 'termsize' */
+ else if (varp == &curwin->w_p_tms)
+ {
+ if (*curwin->w_p_tms != NUL)
+ {
+ p = skipdigits(curwin->w_p_tms);
+ if (p == curwin->w_p_tms || *p != 'x' || *skipdigits(p + 1) != NUL)
+ errmsg = e_invarg;
+ }
+ }
+#endif
+
/* Options that are a list of flags. */
else
{