mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 11:28:22 +00:00
globals: did_si is bool
This commit is contained in:
@@ -4465,7 +4465,7 @@ static int ins_complete(int c, bool enable_pum)
|
|||||||
/* First time we hit ^N or ^P (in a row, I mean) */
|
/* First time we hit ^N or ^P (in a row, I mean) */
|
||||||
|
|
||||||
did_ai = FALSE;
|
did_ai = FALSE;
|
||||||
did_si = FALSE;
|
did_si = false;
|
||||||
can_si = false;
|
can_si = false;
|
||||||
can_si_back = false;
|
can_si_back = false;
|
||||||
if (stop_arrow() == FAIL) {
|
if (stop_arrow() == FAIL) {
|
||||||
@@ -5271,7 +5271,7 @@ insertchar (
|
|||||||
end_comment_pending = NUL;
|
end_comment_pending = NUL;
|
||||||
|
|
||||||
did_ai = FALSE;
|
did_ai = FALSE;
|
||||||
did_si = FALSE;
|
did_si = false;
|
||||||
can_si = false;
|
can_si = false;
|
||||||
can_si_back = false;
|
can_si_back = false;
|
||||||
|
|
||||||
@@ -5660,7 +5660,7 @@ internal_format (
|
|||||||
can_cindent = true;
|
can_cindent = true;
|
||||||
// moved the cursor, don't autoindent or cindent now
|
// moved the cursor, don't autoindent or cindent now
|
||||||
did_ai = FALSE;
|
did_ai = FALSE;
|
||||||
did_si = FALSE;
|
did_si = false;
|
||||||
can_si = false;
|
can_si = false;
|
||||||
can_si_back = false;
|
can_si_back = false;
|
||||||
line_breakcheck();
|
line_breakcheck();
|
||||||
@@ -6082,7 +6082,7 @@ stop_insert (
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
did_ai = FALSE;
|
did_ai = FALSE;
|
||||||
did_si = FALSE;
|
did_si = false;
|
||||||
can_si = false;
|
can_si = false;
|
||||||
can_si_back = false;
|
can_si_back = false;
|
||||||
|
|
||||||
@@ -7466,7 +7466,7 @@ static void ins_shift(int c, int lastc)
|
|||||||
|
|
||||||
if (did_ai && *skipwhite(get_cursor_line_ptr()) != NUL)
|
if (did_ai && *skipwhite(get_cursor_line_ptr()) != NUL)
|
||||||
did_ai = FALSE;
|
did_ai = FALSE;
|
||||||
did_si = FALSE;
|
did_si = false;
|
||||||
can_si = false;
|
can_si = false;
|
||||||
can_si_back = false;
|
can_si_back = false;
|
||||||
can_cindent = false; // no cindenting after ^D or ^T
|
can_cindent = false; // no cindenting after ^D or ^T
|
||||||
@@ -7490,7 +7490,7 @@ static void ins_del(void)
|
|||||||
vim_beep(BO_BS);
|
vim_beep(BO_BS);
|
||||||
}
|
}
|
||||||
did_ai = FALSE;
|
did_ai = FALSE;
|
||||||
did_si = FALSE;
|
did_si = false;
|
||||||
can_si = false;
|
can_si = false;
|
||||||
can_si_back = false;
|
can_si_back = false;
|
||||||
AppendCharToRedobuff(K_DEL);
|
AppendCharToRedobuff(K_DEL);
|
||||||
|
@@ -632,7 +632,7 @@ EXTERN int did_syncbind INIT(= FALSE);
|
|||||||
* This flag is set when a smart indent has been performed. When the next typed
|
* This flag is set when a smart indent has been performed. When the next typed
|
||||||
* character is a '{' the inserted tab will be deleted again.
|
* character is a '{' the inserted tab will be deleted again.
|
||||||
*/
|
*/
|
||||||
EXTERN int did_si INIT(= FALSE);
|
EXTERN bool did_si INIT(= false);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This flag is set after an auto indent. If the next typed character is a '}'
|
* This flag is set after an auto indent. If the next typed character is a '}'
|
||||||
|
@@ -166,7 +166,7 @@ open_line (
|
|||||||
}
|
}
|
||||||
|
|
||||||
u_clearline(); /* cannot do "U" command when adding lines */
|
u_clearline(); /* cannot do "U" command when adding lines */
|
||||||
did_si = FALSE;
|
did_si = false;
|
||||||
ai_col = 0;
|
ai_col = 0;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -286,7 +286,7 @@ open_line (
|
|||||||
* checking for "if" and the like.
|
* checking for "if" and the like.
|
||||||
*/
|
*/
|
||||||
if (last_char == '{') {
|
if (last_char == '{') {
|
||||||
did_si = TRUE; /* do indent */
|
did_si = true; // do indent
|
||||||
no_si = TRUE; /* don't delete it when '{' typed */
|
no_si = TRUE; /* don't delete it when '{' typed */
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
@@ -296,7 +296,7 @@ open_line (
|
|||||||
*/
|
*/
|
||||||
else if (last_char != ';' && last_char != '}'
|
else if (last_char != ';' && last_char != '}'
|
||||||
&& cin_is_cinword(ptr))
|
&& cin_is_cinword(ptr))
|
||||||
did_si = TRUE;
|
did_si = true;
|
||||||
}
|
}
|
||||||
} else { // dir == BACKWARD
|
} else { // dir == BACKWARD
|
||||||
// Skip preprocessor directives, unless they are
|
// Skip preprocessor directives, unless they are
|
||||||
@@ -321,7 +321,7 @@ open_line (
|
|||||||
}
|
}
|
||||||
p = skipwhite(ptr);
|
p = skipwhite(ptr);
|
||||||
if (*p == '}') { // if line starts with '}': do indent
|
if (*p == '}') { // if line starts with '}': do indent
|
||||||
did_si = TRUE;
|
did_si = true;
|
||||||
} else { // can delete indent when '{' typed
|
} else { // can delete indent when '{' typed
|
||||||
can_si_back = true;
|
can_si_back = true;
|
||||||
}
|
}
|
||||||
@@ -814,8 +814,9 @@ open_line (
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
newcol += curwin->w_cursor.col;
|
newcol += curwin->w_cursor.col;
|
||||||
if (no_si)
|
if (no_si) {
|
||||||
did_si = FALSE;
|
did_si = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Reference in New Issue
Block a user