comparison src/change.c @ 30839:942f1b3bc694 v9.0.0754

patch 9.0.0754: 'indentexpr' overrules lisp indenting in one situation Commit: https://github.com/vim/vim/commit/a79b35b5781ae770334cec781d17fec3875f8108 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Oct 15 10:49:36 2022 +0100 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 https://github.com/vim/vim/issues/11327)
author Bram Moolenaar <Bram@vim.org>
date Sat, 15 Oct 2022 12:00:03 +0200
parents ea16b081493d
children 40df8a6515f6
comparison
equal deleted inserted replaced
30838:667e4a093edd 30839:942f1b3bc694
2267 State = MODE_INSERT; 2267 State = MODE_INSERT;
2268 } 2268 }
2269 else 2269 else
2270 vreplace_mode = 0; 2270 vreplace_mode = 0;
2271 2271
2272 // May do lisp indenting.
2273 if (!p_paste 2272 if (!p_paste
2274 && leader == NULL 2273 && leader == NULL
2275 && curbuf->b_p_lisp 2274 && curbuf->b_p_lisp
2276 && curbuf->b_p_ai) 2275 && curbuf->b_p_ai)
2277 { 2276 {
2277 // do lisp indenting
2278 fixthisline(get_lisp_indent); 2278 fixthisline(get_lisp_indent);
2279 ai_col = (colnr_T)getwhitecols_curline(); 2279 ai_col = (colnr_T)getwhitecols_curline();
2280 } 2280 }
2281 2281 else if (do_cindent)
2282 // May do indenting after opening a new line. 2282 {
2283 if (do_cindent) 2283 // do 'cindent' or 'indentexpr' indenting
2284 {
2285 do_c_expr_indent(); 2284 do_c_expr_indent();
2286 ai_col = (colnr_T)getwhitecols_curline(); 2285 ai_col = (colnr_T)getwhitecols_curline();
2287 } 2286 }
2288 2287
2289 if (vreplace_mode != 0) 2288 if (vreplace_mode != 0)