vim-patch:9.0.0754: 'indentexpr' overrules lisp indenting in one situation

Problem:    'indentexpr' overrules lisp indenting in one situation.
Solution:   Add "else" to keep the lisp indent. (issue vim/vim#11327)
a79b35b578
This commit is contained in:
zeertzjq
2022-10-15 19:42:38 +08:00
parent eaac095825
commit 32ced1f08f
2 changed files with 14 additions and 5 deletions

View File

@@ -1814,17 +1814,15 @@ int open_line(int dir, int flags, int second_line_indent, bool *did_do_comment)
vreplace_mode = 0;
}
// May do lisp indenting.
if (!p_paste
&& leader == NULL
&& curbuf->b_p_lisp
&& curbuf->b_p_ai) {
// do lisp indenting
fixthisline(get_lisp_indent);
ai_col = (colnr_T)getwhitecols_curline();
}
// May do indenting after opening a new line.
if (do_cindent) {
} else if (do_cindent) {
// do 'cindent' or 'indentexpr' indenting
do_c_expr_indent();
ai_col = (colnr_T)getwhitecols_curline();
}