patch 9.1.0800: tests: no error check when setting global 'termwinsize' Commit: https://github.com/vim/vim/commit/8be10aa9e4f88d9cc3d0a556cb259635145a8575 Author: Milly <milly...@gmail.com> Date: Tue Oct 22 22:01:46 2024 +0200
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...@gmail.com> Signed-off-by: Christian Brabandt <c...@256bit.org> diff --git a/src/optionstr.c b/src/optionstr.c index b1bb39a62..ccba9765f 100644 --- a/src/optionstr.c +++ b/src/optionstr.c @@ -3904,17 +3904,16 @@ did_set_termwinkey(optset_T *args UNUSED) * The 'termwinsize' option is changed. */ char * -did_set_termwinsize(optset_T *args UNUSED) +did_set_termwinsize(optset_T *args) { + char_u **varp = (char_u **)args->os_varp; char_u *p; - if (*curwin->w_p_tws == NUL) + if ((*varp)[0] == NUL) return NULL; - p = skipdigits(curwin->w_p_tws); - if (p == curwin->w_p_tws - || (*p != 'x' && *p != '*') - || *skipdigits(p + 1) != NUL) + p = skipdigits(*varp); + if (p == *varp || (*p != 'x' && *p != '*') || *skipdigits(p + 1) != NUL) return e_invalid_argument; return NULL; diff --git a/src/testdir/gen_opt_test.vim b/src/testdir/gen_opt_test.vim index e85560252..7b0064cfd 100644 --- a/src/testdir/gen_opt_test.vim +++ b/src/testdir/gen_opt_test.vim @@ -57,7 +57,6 @@ let skip_setglobal_reasons = #{ \ sidescrolloff: 'TODO: fix missing error handling for setglobal', \ tabstop: 'TODO: fix missing error handling for setglobal', \ termwinkey: 'TODO: fix missing error handling for setglobal', - \ termwinsize: '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 7a0b0ad1d..404ebf5e8 100644 --- a/src/version.c +++ b/src/version.c @@ -704,6 +704,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 800, /**/ 799, /**/ -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/E1t3LHT-000MQ1-8d%40256bit.org.