]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.0801: tests: no error check when setting global 'termwinkey' v9.1.0801
authorMilly <milly.ca@gmail.com>
Tue, 22 Oct 2024 20:07:52 +0000 (22:07 +0200)
committerChristian Brabandt <cb@256bit.org>
Tue, 22 Oct 2024 20:07:52 +0000 (22:07 +0200)
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>
src/optionstr.c
src/testdir/gen_opt_test.vim
src/version.c

index ccba9765f6fdd269116fe199532ad3bd41c3bee7..259c64cefed88a919e883f9e6a24d87701b1f82a 100644 (file)
@@ -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;
index 7b0064cfd961b3199daea944543d984a0c310ca9..d12191f29e8e8a9fcee21c64439656d123074947 100644 (file)
@@ -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',
       \}
 
index 404ebf5e8287d29e5437b91d8b8f1721dc618728..1701ffb0026ea0b67e29fd6dab7062735a4ddbfd 100644 (file)
@@ -704,6 +704,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    801,
 /**/
     800,
 /**/