globals: cmd_silent is bool

This commit is contained in:
Jan Edmund Lazo 2018-08-29 00:17:30 -04:00
parent 7c38f60b3b
commit 9fab77c7fb
5 changed files with 7 additions and 7 deletions

View File

@ -11235,7 +11235,7 @@ void get_user_input(const typval_T *const argvars,
} }
} }
int cmd_silent_save = cmd_silent; const bool cmd_silent_save = cmd_silent;
cmd_silent = false; // Want to see the prompt. cmd_silent = false; // Want to see the prompt.
// Only the part of the message after the last NL is considered as // Only the part of the message after the last NL is considered as

View File

@ -123,7 +123,7 @@ void do_debug(char_u *cmd)
int save_msg_scroll = msg_scroll; int save_msg_scroll = msg_scroll;
int save_State = State; int save_State = State;
int save_did_emsg = did_emsg; int save_did_emsg = did_emsg;
int save_cmd_silent = cmd_silent; const bool save_cmd_silent = cmd_silent;
int save_msg_silent = msg_silent; int save_msg_silent = msg_silent;
int save_emsg_silent = emsg_silent; int save_emsg_silent = emsg_silent;
int save_redir_off = redir_off; int save_redir_off = redir_off;

View File

@ -448,7 +448,7 @@ void flush_buffers(int flush_typeahead)
} }
typebuf.tb_maplen = 0; typebuf.tb_maplen = 0;
typebuf.tb_silent = 0; typebuf.tb_silent = 0;
cmd_silent = FALSE; cmd_silent = false;
typebuf.tb_no_abbr_cnt = 0; typebuf.tb_no_abbr_cnt = 0;
} }
@ -959,7 +959,7 @@ int ins_typebuf(char_u *str, int noremap, int offset, int nottyped, bool silent)
typebuf.tb_maplen += addlen; typebuf.tb_maplen += addlen;
if (silent || typebuf.tb_silent > offset) { if (silent || typebuf.tb_silent > offset) {
typebuf.tb_silent += addlen; typebuf.tb_silent += addlen;
cmd_silent = TRUE; cmd_silent = true;
} }
if (typebuf.tb_no_abbr_cnt && offset == 0) /* and not used for abbrev.s */ if (typebuf.tb_no_abbr_cnt && offset == 0) /* and not used for abbrev.s */
typebuf.tb_no_abbr_cnt += addlen; typebuf.tb_no_abbr_cnt += addlen;
@ -1723,7 +1723,7 @@ static int vgetorpeek(int advance)
*typebuf.tb_buf = (char_u)c; *typebuf.tb_buf = (char_u)c;
gotchars(typebuf.tb_buf, 1); gotchars(typebuf.tb_buf, 1);
} }
cmd_silent = FALSE; cmd_silent = false;
break; break;
} else if (typebuf.tb_len > 0) { } else if (typebuf.tb_len > 0) {

View File

@ -751,7 +751,7 @@ EXTERN cmdmod_T cmdmod; /* Ex command modifiers */
EXTERN int msg_silent INIT(= 0); // don't print messages EXTERN int msg_silent INIT(= 0); // don't print messages
EXTERN int emsg_silent INIT(= 0); // don't print error messages EXTERN int emsg_silent INIT(= 0); // don't print error messages
EXTERN bool emsg_noredir INIT(= false); // don't redirect error messages EXTERN bool emsg_noredir INIT(= false); // don't redirect error messages
EXTERN int cmd_silent INIT(= false); // don't echo the command line EXTERN bool cmd_silent INIT(= false); // don't echo the command line
/* Values for swap_exists_action: what to do when swap file already exists */ /* Values for swap_exists_action: what to do when swap file already exists */
#define SEA_NONE 0 /* don't use dialog */ #define SEA_NONE 0 /* don't use dialog */

View File

@ -541,7 +541,7 @@ int emsg(const char_u *s_)
// Reset msg_silent, an error causes messages to be switched back on. // Reset msg_silent, an error causes messages to be switched back on.
msg_silent = 0; msg_silent = 0;
cmd_silent = FALSE; cmd_silent = false;
if (global_busy) { // break :global command if (global_busy) { // break :global command
global_busy++; global_busy++;