mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
use bool type for flag mod_entry_T members
This commit is contained in:
parent
10b014ca7b
commit
f5d3f3da6f
@ -164,18 +164,18 @@ typedef struct expand {
|
|||||||
/// flag. This needs to be saved for recursive commands, put them in a
|
/// flag. This needs to be saved for recursive commands, put them in a
|
||||||
/// structure for easy manipulation.
|
/// structure for easy manipulation.
|
||||||
typedef struct {
|
typedef struct {
|
||||||
int hide; ///< TRUE when ":hide" was used
|
int split; ///< flags for win_split()
|
||||||
int split; ///< flags for win_split()
|
int tab; ///< > 0 when ":tab" was used
|
||||||
int tab; ///< > 0 when ":tab" was used
|
bool browse; ///< true to invoke file dialog
|
||||||
int confirm; ///< TRUE to invoke yes/no dialog
|
bool confirm; ///< true to invoke yes/no dialog
|
||||||
int keepalt; ///< TRUE when ":keepalt" was used
|
bool hide; ///< true when ":hide" was used
|
||||||
int keepmarks; ///< TRUE when ":keepmarks" was used
|
bool keepalt; ///< true when ":keepalt" was used
|
||||||
int keepjumps; ///< TRUE when ":keepjumps" was used
|
bool keepjumps; ///< true when ":keepjumps" was used
|
||||||
int lockmarks; ///< TRUE when ":lockmarks" was used
|
bool keepmarks; ///< true when ":keepmarks" was used
|
||||||
int keeppatterns; ///< TRUE when ":keeppatterns" was used
|
bool keeppatterns; ///< true when ":keeppatterns" was used
|
||||||
bool noswapfile; ///< true when ":noswapfile" was used
|
bool lockmarks; ///< true when ":lockmarks" was used
|
||||||
bool browse; ///< TRUE to invoke file dialog
|
bool noswapfile; ///< true when ":noswapfile" was used
|
||||||
char_u *save_ei; ///< saved value of 'eventignore'
|
char_u *save_ei; ///< saved value of 'eventignore'
|
||||||
} cmdmod_T;
|
} cmdmod_T;
|
||||||
|
|
||||||
#endif // NVIM_EX_CMDS_DEFS_H
|
#endif // NVIM_EX_CMDS_DEFS_H
|
||||||
|
@ -1325,24 +1325,24 @@ static char_u * do_one_cmd(char_u **cmdlinep,
|
|||||||
|
|
||||||
case 'c': if (!checkforcmd(&ea.cmd, "confirm", 4))
|
case 'c': if (!checkforcmd(&ea.cmd, "confirm", 4))
|
||||||
break;
|
break;
|
||||||
cmdmod.confirm = TRUE;
|
cmdmod.confirm = true;
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
case 'k': if (checkforcmd(&ea.cmd, "keepmarks", 3)) {
|
case 'k': if (checkforcmd(&ea.cmd, "keepmarks", 3)) {
|
||||||
cmdmod.keepmarks = TRUE;
|
cmdmod.keepmarks = true;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (checkforcmd(&ea.cmd, "keepalt", 5)) {
|
if (checkforcmd(&ea.cmd, "keepalt", 5)) {
|
||||||
cmdmod.keepalt = TRUE;
|
cmdmod.keepalt = true;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (checkforcmd(&ea.cmd, "keeppatterns", 5)) {
|
if (checkforcmd(&ea.cmd, "keeppatterns", 5)) {
|
||||||
cmdmod.keeppatterns = TRUE;
|
cmdmod.keeppatterns = true;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (!checkforcmd(&ea.cmd, "keepjumps", 5))
|
if (!checkforcmd(&ea.cmd, "keepjumps", 5))
|
||||||
break;
|
break;
|
||||||
cmdmod.keepjumps = TRUE;
|
cmdmod.keepjumps = true;
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
/* ":hide" and ":hide | cmd" are not modifiers */
|
/* ":hide" and ":hide | cmd" are not modifiers */
|
||||||
@ -1350,11 +1350,11 @@ static char_u * do_one_cmd(char_u **cmdlinep,
|
|||||||
|| *p == NUL || ends_excmd(*p))
|
|| *p == NUL || ends_excmd(*p))
|
||||||
break;
|
break;
|
||||||
ea.cmd = p;
|
ea.cmd = p;
|
||||||
cmdmod.hide = TRUE;
|
cmdmod.hide = true;
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
case 'l': if (checkforcmd(&ea.cmd, "lockmarks", 3)) {
|
case 'l': if (checkforcmd(&ea.cmd, "lockmarks", 3)) {
|
||||||
cmdmod.lockmarks = TRUE;
|
cmdmod.lockmarks = true;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5363,13 +5363,13 @@ uc_check_code (
|
|||||||
} mod_entry_T;
|
} mod_entry_T;
|
||||||
static mod_entry_T mod_entries[] = {
|
static mod_entry_T mod_entries[] = {
|
||||||
{ &cmdmod.browse, "browse" },
|
{ &cmdmod.browse, "browse" },
|
||||||
{ (bool *)&cmdmod.confirm, "confirm" },
|
{ &cmdmod.confirm, "confirm" },
|
||||||
{ (bool *)&cmdmod.hide, "hide" },
|
{ &cmdmod.hide, "hide" },
|
||||||
{ (bool *)&cmdmod.keepalt, "keepalt" },
|
{ &cmdmod.keepalt, "keepalt" },
|
||||||
{ (bool *)&cmdmod.keepjumps, "keepjumps" },
|
{ &cmdmod.keepjumps, "keepjumps" },
|
||||||
{ (bool *)&cmdmod.keepmarks, "keepmarks" },
|
{ &cmdmod.keepmarks, "keepmarks" },
|
||||||
{ (bool *)&cmdmod.keeppatterns, "keeppatterns" },
|
{ &cmdmod.keeppatterns, "keeppatterns" },
|
||||||
{ (bool *)&cmdmod.lockmarks, "lockmarks" },
|
{ &cmdmod.lockmarks, "lockmarks" },
|
||||||
{ &cmdmod.noswapfile, "noswapfile" }
|
{ &cmdmod.noswapfile, "noswapfile" }
|
||||||
};
|
};
|
||||||
// the modifiers that are simple flags
|
// the modifiers that are simple flags
|
||||||
|
Loading…
Reference in New Issue
Block a user