aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/edit.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-10-16 08:56:26 +0800
committerGitHub <noreply@github.com>2022-10-16 08:56:26 +0800
commit0b71960ab1bcbcc42f2d6abba4c72cd6ac3c840b (patch)
treeba17ea551188576f660573127e34275f87dc54b0 /src/nvim/edit.c
parentbc798dfd8cea9a5f93461e05dcb8409b6d96afc0 (diff)
parentc8fbf39d474b1140bee10edbcf36305ea49bf863 (diff)
downloadrneovim-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/edit.c')
-rw-r--r--src/nvim/edit.c28
1 files changed, 0 insertions, 28 deletions
diff --git a/src/nvim/edit.c b/src/nvim/edit.c
index 0e14567286..e37f967a2c 100644
--- a/src/nvim/edit.c
+++ b/src/nvim/edit.c
@@ -2993,34 +2993,6 @@ bool cindent_on(void)
return !p_paste && (curbuf->b_p_cin || *curbuf->b_p_inde != NUL);
}
-// Re-indent the current line, based on the current contents of it and the
-// surrounding lines. Fixing the cursor position seems really easy -- I'm very
-// confused what all the part that handles Control-T is doing that I'm not.
-// "get_the_indent" should be get_c_indent, get_expr_indent or get_lisp_indent.
-void fixthisline(IndentGetter get_the_indent)
-{
- int amount = get_the_indent();
-
- if (amount >= 0) {
- change_indent(INDENT_SET, amount, false, 0, true);
- if (linewhite(curwin->w_cursor.lnum)) {
- did_ai = true; // delete the indent if the line stays empty
- }
- }
-}
-
-void fix_indent(void)
-{
- if (p_paste) {
- return;
- }
- if (curbuf->b_p_lisp && curbuf->b_p_ai) {
- fixthisline(get_lisp_indent);
- } else if (cindent_on()) {
- do_c_expr_indent();
- }
-}
-
/// Check that "cinkeys" contains the key "keytyped",
/// when == '*': Only if key is preceded with '*' (indent before insert)
/// when == '!': Only if key is preceded with '!' (don't insert)