diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-05-22 07:52:11 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-22 07:52:11 +0800 |
commit | 5193b17839c6524bb72ca35cbfc477c4ddd8ef13 (patch) | |
tree | 21e24fa0827db2c647b17b4a2ba9acd4240e3c3d /src/nvim/edit.c | |
parent | 0c4086faa17db46d27d4743095a8f16709bcf278 (diff) | |
download | rneovim-5193b17839c6524bb72ca35cbfc477c4ddd8ef13.tar.gz rneovim-5193b17839c6524bb72ca35cbfc477c4ddd8ef13.tar.bz2 rneovim-5193b17839c6524bb72ca35cbfc477c4ddd8ef13.zip |
vim-patch:8.2.4993: smart/C/lisp indenting is optional (#18684)
Problem: smart/C/lisp indenting is optional, which makes the code more
complex, while it only reduces the executable size a bit.
Solution: Graduate FEAT_CINDENT, FEAT_SMARTINDENT and FEAT_LISP.
https://github.com/vim/vim/commit/8e145b82464a21ee4fdf7948f04e2a1d505f8bfa
Diffstat (limited to 'src/nvim/edit.c')
-rw-r--r-- | src/nvim/edit.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/nvim/edit.c b/src/nvim/edit.c index d7e82729a9..593a358b62 100644 --- a/src/nvim/edit.c +++ b/src/nvim/edit.c @@ -3799,6 +3799,7 @@ static bool ins_compl_prep(int c) } bool want_cindent = (can_cindent && cindent_on()); + // When completing whole lines: fix indent for 'cindent'. // Otherwise, break line if it's too long. if (compl_cont_mode == CTRL_X_WHOLE_LINE) { @@ -8412,9 +8413,7 @@ static bool ins_bs(int c, int mode, int *inserted_space_p) mincol = 0; // keep indent if (mode == BACKSPACE_LINE - && (curbuf->b_p_ai - || cindent_on() - ) + && (curbuf->b_p_ai || cindent_on()) && !revins_on) { save_col = curwin->w_cursor.col; beginline(BL_WHITE); |