1
0
forked from aniani/vim

patch 8.0.0743: the 'termsize' option can be set to an invalid value

Problem:    The 'termsize' option can be set to an invalid value.
Solution:   Check the 'termsize' option to be valid.
This commit is contained in:
Bram Moolenaar
2017-07-22 17:04:02 +02:00
parent 8f84c3a866
commit 825680f5f4
3 changed files with 16 additions and 0 deletions

View File

@@ -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
{