Mercurial > vim
changeset 36362:82cb53c7ec4e draft v9.1.0801
patch 9.1.0801: tests: no error check when setting global 'termwinkey'
Commit: https://github.com/vim/vim/commit/94606f70e2e5889feff86f0e8beacdfb88867516
Author: Milly <milly.ca@gmail.com>
Date: Tue Oct 22 22:07:52 2024 +0200
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>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 22 Oct 2024 22:15:04 +0200 |
parents | 2ea63c4d9237 |
children | 3d78ca896bc4 |
files | src/optionstr.c src/testdir/gen_opt_test.vim src/version.c |
diffstat | 3 files changed, 7 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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) -{ - if (*curwin->w_p_twk != NUL && string_to_key(curwin->w_p_twk, TRUE) == 0) +did_set_termwinkey(optset_T *args) +{ + char_u **varp = (char_u **)args->os_varp; + + if ((*varp)[0] != NUL && string_to_key(*varp, TRUE) == 0) return e_invalid_argument; return NULL;
--- 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', \}