diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-10-16 08:56:26 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-16 08:56:26 +0800 |
commit | 0b71960ab1bcbcc42f2d6abba4c72cd6ac3c840b (patch) | |
tree | ba17ea551188576f660573127e34275f87dc54b0 /src/nvim/change.c | |
parent | bc798dfd8cea9a5f93461e05dcb8409b6d96afc0 (diff) | |
parent | c8fbf39d474b1140bee10edbcf36305ea49bf863 (diff) | |
download | rneovim-0b71960ab1bcbcc42f2d6abba4c72cd6ac3c840b.tar.gz rneovim-0b71960ab1bcbcc42f2d6abba4c72cd6ac3c840b.tar.bz2 rneovim-0b71960ab1bcbcc42f2d6abba4c72cd6ac3c840b.zip |
Merge pull request #20677 from zeertzjq/vim-9.0.0761
vim-patch:9.0.{0761,0762,0764}: 'lispoptions'
Diffstat (limited to 'src/nvim/change.c')
-rw-r--r-- | src/nvim/change.c | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/src/nvim/change.c b/src/nvim/change.c index c6f9e9f5c2..2424a8a2eb 100644 --- a/src/nvim/change.c +++ b/src/nvim/change.c @@ -1814,17 +1814,19 @@ int open_line(int dir, int flags, int second_line_indent, bool *did_do_comment) vreplace_mode = 0; } - 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(); - } else if (do_cindent) { - // do 'cindent' or 'indentexpr' indenting - do_c_expr_indent(); - ai_col = (colnr_T)getwhitecols_curline(); + if (!p_paste) { + if (leader == NULL + && !use_indentexpr_for_lisp() + && curbuf->b_p_lisp + && curbuf->b_p_ai) { + // do lisp indenting + fixthisline(get_lisp_indent); + ai_col = (colnr_T)getwhitecols_curline(); + } else if (do_cindent || (curbuf->b_p_ai && use_indentexpr_for_lisp())) { + // do 'cindent' or 'indentexpr' indenting + do_c_expr_indent(); + ai_col = (colnr_T)getwhitecols_curline(); + } } if (vreplace_mode != 0) { |