aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/option.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/option.c')
-rw-r--r--src/nvim/option.c26
1 files changed, 15 insertions, 11 deletions
diff --git a/src/nvim/option.c b/src/nvim/option.c
index 45ebb4fa4c..52a1fd8558 100644
--- a/src/nvim/option.c
+++ b/src/nvim/option.c
@@ -2129,6 +2129,7 @@ void check_buf_options(buf_T *buf)
check_string_option(&buf->b_p_nf);
check_string_option(&buf->b_p_qe);
check_string_option(&buf->b_p_syn);
+ check_string_option(&buf->b_s.b_syn_isk);
check_string_option(&buf->b_s.b_p_spc);
check_string_option(&buf->b_s.b_p_spf);
check_string_option(&buf->b_s.b_p_spl);
@@ -3402,9 +3403,10 @@ char_u *check_stl_option(char_u *s)
if (!*s)
break;
s++;
- if (*s != '%' && *s != ')')
- ++itemcnt;
- if (*s == '%' || *s == STL_TRUNCMARK || *s == STL_MIDDLEMARK) {
+ if (*s != '%' && *s != ')') {
+ itemcnt++;
+ }
+ if (*s == '%' || *s == STL_TRUNCMARK || *s == STL_SEPARATE) {
s++;
continue;
}
@@ -4029,15 +4031,16 @@ set_num_option (
errmsg = e_invarg;
curwin->w_p_fdc = 12;
}
- }
- /* 'shiftwidth' or 'tabstop' */
- else if (pp == &curbuf->b_p_sw || pp == &curbuf->b_p_ts) {
- if (foldmethodIsIndent(curwin))
+ // 'shiftwidth' or 'tabstop'
+ } else if (pp == &curbuf->b_p_sw || pp == (long *)&curbuf->b_p_ts) {
+ if (foldmethodIsIndent(curwin)) {
foldUpdateAll(curwin);
- /* When 'shiftwidth' changes, or it's zero and 'tabstop' changes:
- * parse 'cinoptions'. */
- if (pp == &curbuf->b_p_sw || curbuf->b_p_sw == 0)
+ }
+ // When 'shiftwidth' changes, or it's zero and 'tabstop' changes:
+ // parse 'cinoptions'.
+ if (pp == &curbuf->b_p_sw || curbuf->b_p_sw == 0) {
parse_cino(curbuf);
+ }
}
/* 'maxcombine' */
else if (pp == &p_mco) {
@@ -5606,6 +5609,7 @@ void buf_copy_options(buf_T *buf, int flags)
/* Don't copy 'syntax', it must be set */
buf->b_p_syn = empty_option;
buf->b_p_smc = p_smc;
+ buf->b_s.b_syn_isk = empty_option;
buf->b_s.b_p_spc = vim_strsave(p_spc);
(void)compile_cap_prog(&buf->b_s);
buf->b_s.b_p_spf = vim_strsave(p_spf);
@@ -5655,7 +5659,7 @@ void buf_copy_options(buf_T *buf, int flags)
buf->b_p_isk = save_p_isk;
else {
buf->b_p_isk = vim_strsave(p_isk);
- did_isk = TRUE;
+ did_isk = true;
buf->b_p_ts = p_ts;
buf->b_help = false;
if (buf->b_p_bt[0] == 'h')