refactor: change FALSE/TRUE to false/true

Co-authored-by: zeertzjq <zeertzjq@outlook.com>
This commit is contained in:
Lewis Russell
2022-08-25 14:41:02 +01:00
parent 946c0aa66f
commit 2498e9feb0
38 changed files with 729 additions and 796 deletions

View File

@@ -105,8 +105,8 @@ typedef struct command_line_state {
long count;
int indent;
int c;
int gotesc; // TRUE when <ESC> just typed
int do_abbr; // when TRUE check for abbr.
int gotesc; // true when <ESC> just typed
int do_abbr; // when true check for abbr.
char_u *lookfor; // string to match
int hiscnt; // current history line in use
int save_hiscnt; // history line before attempting
@@ -3029,7 +3029,7 @@ color_cmdline_error:
/*
* Draw part of the cmdline at the current cursor position. But draw stars
* when cmdline_star is TRUE.
* when cmdline_star is true.
*/
static void draw_cmdline(int start, int len)
{
@@ -3283,7 +3283,7 @@ void cmdline_ui_flush(void)
/*
* Put a character on the command line. Shifts the following text to the
* right when "shift" is TRUE. Used for CTRL-V, CTRL-K, etc.
* right when "shift" is true. Used for CTRL-V, CTRL-K, etc.
* "c" must be printable (fit in one display cell)!
*/
void putcmdline(char c, int shift)
@@ -3309,7 +3309,7 @@ void putcmdline(char c, int shift)
ui_cursor_shape();
}
/// Undo a putcmdline(c, FALSE).
/// Undo a putcmdline(c, false).
void unputcmdline(void)
{
if (cmd_silent) {
@@ -3330,9 +3330,9 @@ void unputcmdline(void)
/*
* Put the given string, of the given length, onto the command line.
* If len is -1, then STRLEN() is used to calculate the length.
* If 'redraw' is TRUE then the new part of the command line, and the remaining
* If 'redraw' is true then the new part of the command line, and the remaining
* part will be redrawn, otherwise it will not. If this function is called
* twice in a row, then 'redraw' should be FALSE and redrawcmd() should be
* twice in a row, then 'redraw' should be false and redrawcmd() should be
* called afterwards.
*/
void put_on_cmdline(char_u *str, int len, int redraw)
@@ -3409,7 +3409,7 @@ void put_on_cmdline(char_u *str, int len, int redraw)
}
if (redraw && !cmd_silent) {
msg_no_more = TRUE;
msg_no_more = true;
i = cmdline_row;
cursorcmd();
draw_cmdline(ccline.cmdpos, ccline.cmdlen - ccline.cmdpos);
@@ -3417,7 +3417,7 @@ void put_on_cmdline(char_u *str, int len, int redraw)
if (cmdline_row != i || ccline.overstrike) {
msg_clr_eos();
}
msg_no_more = FALSE;
msg_no_more = false;
}
if (KeyTyped) {
m = Columns * Rows;
@@ -3544,8 +3544,8 @@ static bool cmdline_paste(int regname, bool literally, bool remcr)
/*
* Put a string on the command line.
* When "literally" is TRUE, insert literally.
* When "literally" is FALSE, insert as typed, but don't leave the command
* When "literally" is true, insert literally.
* When "literally" is false, insert as typed, but don't leave the command
* line.
*/
void cmdline_paste_str(char_u *s, int literally)
@@ -3553,7 +3553,7 @@ void cmdline_paste_str(char_u *s, int literally)
int c, cv;
if (literally) {
put_on_cmdline(s, -1, TRUE);
put_on_cmdline(s, -1, true);
} else {
while (*s != NUL) {
cv = *s;
@@ -3642,7 +3642,7 @@ void redrawcmd(void)
redrawcmdprompt();
// Don't use more prompt, truncate the cmdline if it doesn't fit.
msg_no_more = TRUE;
msg_no_more = true;
draw_cmdline(0, ccline.cmdlen);
msg_clr_eos();
msg_no_more = false;
@@ -3657,7 +3657,7 @@ void redrawcmd(void)
* An emsg() before may have set msg_scroll. This is used in normal mode,
* in cmdline mode we can reset them now.
*/
msg_scroll = FALSE; // next message overwrites cmdline
msg_scroll = false; // next message overwrites cmdline
// Typing ':' at the more prompt may set skip_redraw. We don't want this
// in cmdline mode.