aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/indent_c.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/indent_c.c')
-rw-r--r--src/nvim/indent_c.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/nvim/indent_c.c b/src/nvim/indent_c.c
index 54e7d72adc..06153267bc 100644
--- a/src/nvim/indent_c.c
+++ b/src/nvim/indent_c.c
@@ -1868,10 +1868,11 @@ int get_c_indent(void)
* For unknown reasons the cursor might be past the end of the line, thus
* check for that.
*/
- if ((State & INSERT)
+ if ((State & MODE_INSERT)
&& curwin->w_cursor.col < (colnr_T)STRLEN(linecopy)
- && linecopy[curwin->w_cursor.col] == ')')
+ && linecopy[curwin->w_cursor.col] == ')') {
linecopy[curwin->w_cursor.col] = NUL;
+ }
theline = (char_u *)skipwhite((char *)linecopy);