mirror of
https://github.com/neovim/neovim.git
synced 2025-10-08 02:46:31 +00:00
Merge pull request #23054 from bfredl/nobehave
feat(ex_cmds)!: remove :behave
This commit is contained in:
@@ -2104,10 +2104,6 @@ static const char *set_context_by_cmdname(const char *cmd, cmdidx_T cmdidx, expa
|
||||
xp->xp_context = EXPAND_CHECKHEALTH;
|
||||
xp->xp_pattern = (char *)arg;
|
||||
break;
|
||||
case CMD_behave:
|
||||
xp->xp_context = EXPAND_BEHAVE;
|
||||
xp->xp_pattern = (char *)arg;
|
||||
break;
|
||||
|
||||
case CMD_messages:
|
||||
xp->xp_context = EXPAND_MESSAGES;
|
||||
@@ -2478,19 +2474,6 @@ static int expand_files_and_dirs(expand_T *xp, char *pat, char ***matches, int *
|
||||
return ret;
|
||||
}
|
||||
|
||||
/// Function given to ExpandGeneric() to obtain the possible arguments of the
|
||||
/// ":behave {mswin,xterm}" command.
|
||||
static char *get_behave_arg(expand_T *xp FUNC_ATTR_UNUSED, int idx)
|
||||
{
|
||||
if (idx == 0) {
|
||||
return "mswin";
|
||||
}
|
||||
if (idx == 1) {
|
||||
return "xterm";
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/// Function given to ExpandGeneric() to obtain the possible arguments of the
|
||||
/// ":breakadd {expr, file, func, here}" command.
|
||||
/// ":breakdel {func, file, here}" command.
|
||||
@@ -2585,7 +2568,6 @@ static int ExpandOther(char *pat, expand_T *xp, regmatch_T *rmp, char ***matches
|
||||
int escaped;
|
||||
} tab[] = {
|
||||
{ EXPAND_COMMANDS, get_command_name, false, true },
|
||||
{ EXPAND_BEHAVE, get_behave_arg, true, true },
|
||||
{ EXPAND_MAPCLEAR, get_mapclear_arg, true, true },
|
||||
{ EXPAND_MESSAGES, get_messages_arg, true, true },
|
||||
{ EXPAND_HISTORY, get_history_arg, true, true },
|
||||
|
@@ -196,12 +196,6 @@ module.cmds = {
|
||||
addr_type='ADDR_BUFFERS',
|
||||
func='ex_bunload',
|
||||
},
|
||||
{
|
||||
command='behave',
|
||||
flags=bit.bor(BANG, NEEDARG, WORD1, TRLBAR, CMDWIN, LOCK_OK),
|
||||
addr_type='ADDR_NONE',
|
||||
func='ex_behave',
|
||||
},
|
||||
{
|
||||
command='belowright',
|
||||
flags=bit.bor(NEEDARG, EXTRA, NOTRLCOM),
|
||||
|
@@ -7058,24 +7058,6 @@ void dialog_msg(char *buff, char *format, char *fname)
|
||||
vim_snprintf(buff, DIALOG_MSG_SIZE, format, fname);
|
||||
}
|
||||
|
||||
/// ":behave {mswin,xterm}"
|
||||
static void ex_behave(exarg_T *eap)
|
||||
{
|
||||
if (strcmp(eap->arg, "mswin") == 0) {
|
||||
set_option_value_give_err("selection", 0L, "exclusive", 0);
|
||||
set_option_value_give_err("selectmode", 0L, "mouse,key", 0);
|
||||
set_option_value_give_err("mousemodel", 0L, "popup", 0);
|
||||
set_option_value_give_err("keymodel", 0L, "startsel,stopsel", 0);
|
||||
} else if (strcmp(eap->arg, "xterm") == 0) {
|
||||
set_option_value_give_err("selection", 0L, "inclusive", 0);
|
||||
set_option_value_give_err("selectmode", 0L, "", 0);
|
||||
set_option_value_give_err("mousemodel", 0L, "extend", 0);
|
||||
set_option_value_give_err("keymodel", 0L, "", 0);
|
||||
} else {
|
||||
semsg(_(e_invarg2), eap->arg);
|
||||
}
|
||||
}
|
||||
|
||||
static TriState filetype_detect = kNone;
|
||||
static TriState filetype_plugin = kNone;
|
||||
static TriState filetype_indent = kNone;
|
||||
|
@@ -56,7 +56,6 @@ static const char e_no_such_user_defined_command_in_current_buffer_str[]
|
||||
static const char *command_complete[] = {
|
||||
[EXPAND_ARGLIST] = "arglist",
|
||||
[EXPAND_AUGROUP] = "augroup",
|
||||
[EXPAND_BEHAVE] = "behave",
|
||||
[EXPAND_BUFFERS] = "buffer",
|
||||
[EXPAND_CHECKHEALTH] = "checkhealth",
|
||||
[EXPAND_COLORS] = "color",
|
||||
|
@@ -140,7 +140,6 @@ enum {
|
||||
EXPAND_SHELLCMD,
|
||||
EXPAND_SIGN,
|
||||
EXPAND_PROFILE,
|
||||
EXPAND_BEHAVE,
|
||||
EXPAND_FILETYPE,
|
||||
EXPAND_FILES_IN_PATH,
|
||||
EXPAND_OWNSYNTAX,
|
||||
|
Reference in New Issue
Block a user