aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nvim/edit.c12
-rw-r--r--src/nvim/globals.h2
-rw-r--r--src/nvim/misc1.c7
-rw-r--r--src/nvim/ops.c2
4 files changed, 12 insertions, 11 deletions
diff --git a/src/nvim/edit.c b/src/nvim/edit.c
index 3d234c8c56..99ab991d51 100644
--- a/src/nvim/edit.c
+++ b/src/nvim/edit.c
@@ -4466,7 +4466,7 @@ static int ins_complete(int c, bool enable_pum)
did_ai = FALSE;
did_si = FALSE;
- can_si = FALSE;
+ can_si = false;
can_si_back = false;
if (stop_arrow() == FAIL) {
return FAIL;
@@ -5272,7 +5272,7 @@ insertchar (
did_ai = FALSE;
did_si = FALSE;
- can_si = FALSE;
+ can_si = false;
can_si_back = false;
// If there's any pending input, grab up to INPUT_BUFLEN at once.
@@ -5661,7 +5661,7 @@ internal_format (
// moved the cursor, don't autoindent or cindent now
did_ai = FALSE;
did_si = FALSE;
- can_si = FALSE;
+ can_si = false;
can_si_back = false;
line_breakcheck();
}
@@ -6083,7 +6083,7 @@ stop_insert (
}
did_ai = FALSE;
did_si = FALSE;
- can_si = FALSE;
+ can_si = false;
can_si_back = false;
/* Set '[ and '] to the inserted text. When end_insert_pos is NULL we are
@@ -7467,7 +7467,7 @@ static void ins_shift(int c, int lastc)
if (did_ai && *skipwhite(get_cursor_line_ptr()) != NUL)
did_ai = FALSE;
did_si = FALSE;
- can_si = FALSE;
+ can_si = false;
can_si_back = false;
can_cindent = false; // no cindenting after ^D or ^T
}
@@ -7491,7 +7491,7 @@ static void ins_del(void)
}
did_ai = FALSE;
did_si = FALSE;
- can_si = FALSE;
+ can_si = false;
can_si_back = false;
AppendCharToRedobuff(K_DEL);
}
diff --git a/src/nvim/globals.h b/src/nvim/globals.h
index c356716f44..25a82c07d4 100644
--- a/src/nvim/globals.h
+++ b/src/nvim/globals.h
@@ -638,7 +638,7 @@ EXTERN int did_si INIT(= FALSE);
* This flag is set after an auto indent. If the next typed character is a '}'
* one indent will be removed.
*/
-EXTERN int can_si INIT(= FALSE);
+EXTERN bool can_si INIT(= false);
/*
* This flag is set after an "O" command. If the next typed character is a '{'
diff --git a/src/nvim/misc1.c b/src/nvim/misc1.c
index 415b4938cc..3a2795f530 100644
--- a/src/nvim/misc1.c
+++ b/src/nvim/misc1.c
@@ -328,8 +328,9 @@ open_line (
}
curwin->w_cursor = old_cursor;
}
- if (do_si)
- can_si = TRUE;
+ if (do_si) {
+ can_si = true;
+ }
did_ai = TRUE;
}
@@ -666,7 +667,7 @@ open_line (
}
}
- did_si = can_si = FALSE;
+ did_si = can_si = false;
} else if (comment_end != NULL) {
// We have finished a comment, so we don't use the leader.
// If this was a C-comment and 'ai' or 'si' is set do a normal
diff --git a/src/nvim/ops.c b/src/nvim/ops.c
index ba4f3cb431..9107f1385e 100644
--- a/src/nvim/ops.c
+++ b/src/nvim/ops.c
@@ -2178,7 +2178,7 @@ int op_change(oparg_T *oap)
if (!p_paste && curbuf->b_p_si
&& !curbuf->b_p_cin
)
- can_si = TRUE; /* It's like opening a new line, do si */
+ can_si = true; // It's like opening a new line, do si
}
/* First delete the text in the region. In an empty buffer only need to