mirror of
https://github.com/vim/vim.git
synced 2025-10-21 08:24:06 -04:00
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:
13
src/option.c
13
src/option.c
@@ -7479,6 +7479,19 @@ did_set_string_option(
|
|||||||
}
|
}
|
||||||
#endif
|
#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. */
|
/* Options that are a list of flags. */
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@@ -124,6 +124,7 @@ let test_values = {
|
|||||||
\ 'switchbuf': [['', 'useopen', 'split,newtab'], ['xxx']],
|
\ 'switchbuf': [['', 'useopen', 'split,newtab'], ['xxx']],
|
||||||
\ 'tagcase': [['smart', 'match'], ['', 'xxx', 'smart,match']],
|
\ 'tagcase': [['smart', 'match'], ['', 'xxx', 'smart,match']],
|
||||||
\ 'term': [[], []],
|
\ 'term': [[], []],
|
||||||
|
\ 'termsize': [['', '24x80', '0x80', '32x0', '0x0'], ['xxx', '80', '8ax9', '24x80b']],
|
||||||
\ 'toolbar': [['', 'icons', 'text'], ['xxx']],
|
\ 'toolbar': [['', 'icons', 'text'], ['xxx']],
|
||||||
\ 'toolbariconsize': [['', 'tiny', 'huge'], ['xxx']],
|
\ 'toolbariconsize': [['', 'tiny', 'huge'], ['xxx']],
|
||||||
\ 'ttymouse': [['', 'xterm'], ['xxx']],
|
\ 'ttymouse': [['', 'xterm'], ['xxx']],
|
||||||
|
@@ -769,6 +769,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
743,
|
||||||
/**/
|
/**/
|
||||||
742,
|
742,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user