1
0
forked from aniani/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 #11327)
This commit is contained in:
Bram Moolenaar
2022-10-15 10:49:36 +01:00
parent b77bdce120
commit a79b35b578
3 changed files with 16 additions and 4 deletions

View File

@@ -2269,19 +2269,18 @@ open_line(
else
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();
}