commit 7bee622fdc72d7461ed43ea170cca20056891d2c
parent 15499fa856f6fbaf3208a26647db95259ae76e8e
Author: Lewis Russell <lewis6991@gmail.com>
Date: Wed, 25 Jan 2023 12:17:38 +0000
refactor(optionstr.c): move handling of formatlistpat
Diffstat:
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/nvim/optionstr.c b/src/nvim/optionstr.c
@@ -1849,6 +1849,12 @@ static char *did_set_string_option_for(buf_T *buf, win_T *win, int opt_idx, char
did_set_option_listflag(varp, COCU_ALL, errbuf, errbuflen, &errmsg);
} else if (varp == &p_mouse) { // 'mouse'
did_set_option_listflag(varp, MOUSE_ALL, errbuf, errbuflen, &errmsg);
+ } else if (gvarp == &p_flp) {
+ if (win->w_briopt_list) {
+ // Changing Formatlistpattern when briopt includes the list setting:
+ // redraw
+ redraw_all_later(UPD_NOT_VALID);
+ }
}
// If error detected, restore the previous value.
@@ -1896,12 +1902,6 @@ static char *did_set_string_option_for(buf_T *buf, win_T *win, int opt_idx, char
setmouse(); // in case 'mouse' changed
}
- // Changing Formatlistpattern when briopt includes the list setting:
- // redraw
- if ((varp == &p_flp || varp == &(buf->b_p_flp)) && win->w_briopt_list) {
- redraw_all_later(UPD_NOT_VALID);
- }
-
if (win->w_curswant != MAXCOL
&& (opt->flags & (P_CURSWANT | P_RALL)) != 0) {
win->w_set_curswant = true;