Skip to content

Commit 8be10aa

Browse files
Millychrisbra
authored andcommitted
patch 9.1.0800: tests: no error check when setting global 'termwinsize'
Problem: tests: no error check when setting global 'termwinsize' Solution: Also validate when using setglobal (Milly). closes: #15918 Signed-off-by: Milly <milly.ca@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
1 parent 19be0eb commit 8be10aa

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

src/optionstr.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3904,17 +3904,16 @@ did_set_termwinkey(optset_T *args UNUSED)
39043904
* The 'termwinsize' option is changed.
39053905
*/
39063906
char *
3907-
did_set_termwinsize(optset_T *args UNUSED)
3907+
did_set_termwinsize(optset_T *args)
39083908
{
3909+
char_u **varp = (char_u **)args->os_varp;
39093910
char_u *p;
39103911

3911-
if (*curwin->w_p_tws == NUL)
3912+
if ((*varp)[0] == NUL)
39123913
return NULL;
39133914

3914-
p = skipdigits(curwin->w_p_tws);
3915-
if (p == curwin->w_p_tws
3916-
|| (*p != 'x' && *p != '*')
3917-
|| *skipdigits(p + 1) != NUL)
3915+
p = skipdigits(*varp);
3916+
if (p == *varp || (*p != 'x' && *p != '*') || *skipdigits(p + 1) != NUL)
39183917
return e_invalid_argument;
39193918

39203919
return NULL;

src/testdir/gen_opt_test.vim

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ let skip_setglobal_reasons = #{
5757
\ sidescrolloff: 'TODO: fix missing error handling for setglobal',
5858
\ tabstop: 'TODO: fix missing error handling for setglobal',
5959
\ termwinkey: 'TODO: fix missing error handling for setglobal',
60-
\ termwinsize: 'TODO: fix missing error handling for setglobal',
6160
\ textwidth: 'TODO: fix missing error handling for setglobal',
6261
\}
6362

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -704,6 +704,8 @@ static char *(features[]) =
704704

705705
static int included_patches[] =
706706
{ /* Add new patch number below this line */
707+
/**/
708+
800,
707709
/**/
708710
799,
709711
/**/

0 commit comments

Comments
 (0)