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:
committed by
Christian Brabandt
parent
231480f975
commit
b38700ac81
@@ -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
|
||||
|
Reference in New Issue
Block a user