0
0
mirror of https://github.com/vim/vim.git synced 2025-09-27 04:14:06 -04:00

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: #15911

Signed-off-by: Milly <milly.ca@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Milly
2024-10-22 22:59:39 +02:00
committed by Christian Brabandt
parent 231480f975
commit b38700ac81
6 changed files with 25 additions and 11 deletions

View File

@@ -1235,17 +1235,19 @@ did_set_breakat(optset_T *args UNUSED)
* The 'breakindentopt' option is changed.
*/
char *
did_set_breakindentopt(optset_T *args UNUSED)
did_set_breakindentopt(optset_T *args)
{
char *errmsg = NULL;
char_u **varp = (char_u **)args->os_varp;
if (briopt_check(*varp, varp == &curwin->w_p_briopt ? curwin : NULL)
== FAIL)
return e_invalid_argument;
if (briopt_check(curwin) == FAIL)
errmsg = e_invalid_argument;
// list setting requires a redraw
if (curwin->w_briopt_list)
if (varp == &curwin->w_p_briopt && curwin->w_briopt_list)
redraw_all_later(UPD_NOT_VALID);
return errmsg;
return NULL;
}
int