diff options
author | zeertzjq <zeertzjq@outlook.com> | 2024-10-24 06:31:09 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2024-10-24 06:56:12 +0800 |
commit | 6b63fe798b7481edd8e3b0ed75a33bf297ca2856 (patch) | |
tree | 7227b779a906055a65123a3bbb650db3b2d5c72e /src/nvim/optionstr.c | |
parent | 5436d9b3c6c537b243ea6af4f1acc143bf94de1c (diff) | |
download | rneovim-6b63fe798b7481edd8e3b0ed75a33bf297ca2856.tar.gz rneovim-6b63fe798b7481edd8e3b0ed75a33bf297ca2856.tar.bz2 rneovim-6b63fe798b7481edd8e3b0ed75a33bf297ca2856.zip |
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
https://github.com/vim/vim/commit/b38700ac81d90a652e5c8495056dd78df5babdde
Co-authored-by: Milly <milly.ca@gmail.com>
Diffstat (limited to 'src/nvim/optionstr.c')
-rw-r--r-- | src/nvim/optionstr.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/nvim/optionstr.c b/src/nvim/optionstr.c index 0e63a8089d..23b70ab5ad 100644 --- a/src/nvim/optionstr.c +++ b/src/nvim/optionstr.c @@ -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); } |