diff options
author | Lewis Russell <lewis6991@gmail.com> | 2023-01-25 12:17:38 +0000 |
---|---|---|
committer | Lewis Russell <lewis6991@gmail.com> | 2023-01-25 12:17:38 +0000 |
commit | 7bee622fdc72d7461ed43ea170cca20056891d2c (patch) | |
tree | 008deeb5eb8bd32d73dddadbea384afa4871310b | |
parent | 15499fa856f6fbaf3208a26647db95259ae76e8e (diff) | |
download | rneovim-7bee622fdc72d7461ed43ea170cca20056891d2c.tar.gz rneovim-7bee622fdc72d7461ed43ea170cca20056891d2c.tar.bz2 rneovim-7bee622fdc72d7461ed43ea170cca20056891d2c.zip |
refactor(optionstr.c): move handling of formatlistpat
-rw-r--r-- | src/nvim/optionstr.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/nvim/optionstr.c b/src/nvim/optionstr.c index 5ce72693df..a5a708600f 100644 --- 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; |