Skip to content

Commit 94606f7

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

3 files changed

Lines changed: 6 additions & 3 deletions

File tree

src/optionstr.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3892,9 +3892,11 @@ did_set_term_option(optset_T *args)
38923892
* The 'termwinkey' option is changed.
38933893
*/
38943894
char *
3895-
did_set_termwinkey(optset_T *args UNUSED)
3895+
did_set_termwinkey(optset_T *args)
38963896
{
3897-
if (*curwin->w_p_twk != NUL && string_to_key(curwin->w_p_twk, TRUE) == 0)
3897+
char_u **varp = (char_u **)args->os_varp;
3898+
3899+
if ((*varp)[0] != NUL && string_to_key(*varp, TRUE) == 0)
38983900
return e_invalid_argument;
38993901

39003902
return NULL;

src/testdir/gen_opt_test.vim

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

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+
801,
707709
/**/
708710
800,
709711
/**/

0 commit comments

Comments
 (0)