aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbfredl <bjorn.linse@gmail.com>2023-04-13 12:39:05 +0200
committerGitHub <noreply@github.com>2023-04-13 12:39:05 +0200
commit231e1988ed788caa6b15817c63e94f38cd8ac75c (patch)
tree19075fb970fe69dd7cc0a146c4a2db1a33fe02f5 /src
parent99c1010aa740b76df341a756231e99d0116fc3be (diff)
parente4a136f713753e6ace97f419be562567f1ce535f (diff)
downloadrneovim-231e1988ed788caa6b15817c63e94f38cd8ac75c.tar.gz
rneovim-231e1988ed788caa6b15817c63e94f38cd8ac75c.tar.bz2
rneovim-231e1988ed788caa6b15817c63e94f38cd8ac75c.zip
Merge pull request #23054 from bfredl/nobehave
feat(ex_cmds)!: remove :behave
Diffstat (limited to 'src')
-rw-r--r--src/nvim/cmdexpand.c18
-rw-r--r--src/nvim/ex_cmds.lua6
-rw-r--r--src/nvim/ex_docmd.c18
-rw-r--r--src/nvim/usercmd.c1
-rw-r--r--src/nvim/vim.h1
5 files changed, 0 insertions, 44 deletions
diff --git a/src/nvim/cmdexpand.c b/src/nvim/cmdexpand.c
index 774e16f73d..f2776191b7 100644
--- a/src/nvim/cmdexpand.c
+++ b/src/nvim/cmdexpand.c
@@ -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;
@@ -2479,19 +2475,6 @@ static int expand_files_and_dirs(expand_T *xp, char *pat, char ***matches, int *
}
/// 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.
static char *get_breakadd_arg(expand_T *xp FUNC_ATTR_UNUSED, int idx)
@@ -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 },
diff --git a/src/nvim/ex_cmds.lua b/src/nvim/ex_cmds.lua
index 2fd50a18d3..bdc1174de3 100644
--- a/src/nvim/ex_cmds.lua
+++ b/src/nvim/ex_cmds.lua
@@ -197,12 +197,6 @@ module.cmds = {
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),
addr_type='ADDR_NONE',
diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c
index 699c1da3a7..fbdb1bc2d7 100644
--- a/src/nvim/ex_docmd.c
+++ b/src/nvim/ex_docmd.c
@@ -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;
diff --git a/src/nvim/usercmd.c b/src/nvim/usercmd.c
index 4cd58bb91b..e859a96552 100644
--- a/src/nvim/usercmd.c
+++ b/src/nvim/usercmd.c
@@ -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",
diff --git a/src/nvim/vim.h b/src/nvim/vim.h
index 00e28e3e68..44e3e9d86a 100644
--- a/src/nvim/vim.h
+++ b/src/nvim/vim.h
@@ -140,7 +140,6 @@ enum {
EXPAND_SHELLCMD,
EXPAND_SIGN,
EXPAND_PROFILE,
- EXPAND_BEHAVE,
EXPAND_FILETYPE,
EXPAND_FILES_IN_PATH,
EXPAND_OWNSYNTAX,