summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMilly <milly.ca@gmail.com>2024-10-22 22:07:52 +0200
committerChristian Brabandt <cb@256bit.org>2024-10-22 22:07:52 +0200
commit94606f70e2e5889feff86f0e8beacdfb88867516 (patch)
treedaf05f56a12c5ae181f977beef86eb064f6fe19b
parent8be10aa9e4f88d9cc3d0a556cb259635145a8575 (diff)
patch 9.1.0801: tests: no error check when setting global 'termwinkey'v9.1.0801
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>
-rw-r--r--src/optionstr.c6
-rw-r--r--src/testdir/gen_opt_test.vim1
-rw-r--r--src/version.c2
3 files changed, 6 insertions, 3 deletions
diff --git a/src/optionstr.c b/src/optionstr.c
index ccba9765f6..259c64cefe 100644
--- a/src/optionstr.c
+++ b/src/optionstr.c
@@ -3892,9 +3892,11 @@ did_set_term_option(optset_T *args)
* The 'termwinkey' option is changed.
*/
char *
-did_set_termwinkey(optset_T *args UNUSED)
+did_set_termwinkey(optset_T *args)
{
- if (*curwin->w_p_twk != NUL && string_to_key(curwin->w_p_twk, TRUE) == 0)
+ char_u **varp = (char_u **)args->os_varp;
+
+ if ((*varp)[0] != NUL && string_to_key(*varp, TRUE) == 0)
return e_invalid_argument;
return NULL;
diff --git a/src/testdir/gen_opt_test.vim b/src/testdir/gen_opt_test.vim
index 7b0064cfd9..d12191f29e 100644
--- a/src/testdir/gen_opt_test.vim
+++ b/src/testdir/gen_opt_test.vim
@@ -56,7 +56,6 @@ let skip_setglobal_reasons = #{
\ shiftwidth: 'TODO: fix missing error handling for setglobal',
\ sidescrolloff: 'TODO: fix missing error handling for setglobal',
\ tabstop: 'TODO: fix missing error handling for setglobal',
- \ termwinkey: 'TODO: fix missing error handling for setglobal',
\ textwidth: 'TODO: fix missing error handling for setglobal',
\}
diff --git a/src/version.c b/src/version.c
index 404ebf5e82..1701ffb002 100644
--- a/src/version.c
+++ b/src/version.c
@@ -705,6 +705,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 801,
+/**/
800,
/**/
799,