diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/nvim/buffer.c | 2 | ||||
| -rw-r--r-- | src/nvim/option.c | 11 | ||||
| -rw-r--r-- | src/nvim/window.c | 2 | 
3 files changed, 12 insertions, 3 deletions
| diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c index 7def8c1684..ebe50c6d31 100644 --- a/src/nvim/buffer.c +++ b/src/nvim/buffer.c @@ -2316,7 +2316,7 @@ void get_winopts(buf_T *buf)    /* Set 'foldlevel' to 'foldlevelstart' if it's not negative. */    if (p_fdls >= 0)      curwin->w_p_fdl = p_fdls; -  check_colorcolumn(curwin); +  didset_window_options(curwin);  }  /* diff --git a/src/nvim/option.c b/src/nvim/option.c index 3658f17883..95e9844187 100644 --- a/src/nvim/option.c +++ b/src/nvim/option.c @@ -8,6 +8,9 @@  //   - Add a BV_XX or WV_XX entry to option_defs.h  //   - Add a variable to the window or buffer struct in buffer_defs.h.  //   - For a window option, add some code to copy_winopt(). +//   - For a window string option, add code to check_winopt() +//     and clear_winopt(). If setting the option needs parsing, +//     add some code to didset_window_options().  //   - For a buffer option, add some code to buf_copy_options().  //   - For a buffer string option, add code to check_buf_options().  // - If it's a numeric option, add any necessary bounds checks to do_set(). @@ -5514,7 +5517,6 @@ void win_copy_options(win_T *wp_from, win_T *wp_to)    copy_winopt(&wp_from->w_allbuf_opt, &wp_to->w_allbuf_opt);    /* Is this right? */    wp_to->w_farsi = wp_from->w_farsi; -  briopt_check(wp_to);  }  /* @@ -5616,6 +5618,13 @@ void clear_winopt(winopt_T *wop)    clear_string_option(&wop->wo_briopt);  } +void didset_window_options(win_T *wp) +{ +  check_colorcolumn(wp); +  briopt_check(wp); +} + +  /*   * Copy global option values to local options for one buffer.   * Used when creating a new buffer and sometimes when entering a buffer. diff --git a/src/nvim/window.c b/src/nvim/window.c index 69c0a838ea..85f3667b6b 100644 --- a/src/nvim/window.c +++ b/src/nvim/window.c @@ -1043,7 +1043,7 @@ static void win_init(win_T *newp, win_T *oldp, int flags)    win_init_some(newp, oldp); -  check_colorcolumn(newp); +  didset_window_options(newp);  }  /* | 
