vim-patch:9.1.0806: tests: no error check when setting global 'briopt'

Problem:  tests: no error check when setting global 'briopt'
Solution: also parse and check global 'briopt' value (Milly)

closes: vim/vim#15911

b38700ac81

Co-authored-by: Milly <milly.ca@gmail.com>
This commit is contained in:
zeertzjq
2024-10-24 06:31:09 +08:00
parent 5436d9b3c6
commit 6b63fe798b
4 changed files with 24 additions and 6 deletions

View File

@@ -717,11 +717,14 @@ const char *did_set_breakat(optset_T *args FUNC_ATTR_UNUSED)
const char *did_set_breakindentopt(optset_T *args)
{
win_T *win = (win_T *)args->os_win;
if (briopt_check(win) == FAIL) {
char **varp = (char **)args->os_varp;
if (briopt_check(*varp, varp == &win->w_p_briopt ? win : NULL) == FAIL) {
return e_invarg;
}
// list setting requires a redraw
if (win == curwin && win->w_briopt_list) {
if (varp == &win->w_p_briopt && win->w_briopt_list) {
redraw_all_later(UPD_NOT_VALID);
}