aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Reed <m.reed@mykolab.com>2015-10-30 14:35:12 -0400
committerMichael Reed <m.reed@mykolab.com>2015-11-07 14:33:10 -0500
commitc40dff6453a3f4655981ba7a49dbcace0240f5fc (patch)
tree095401e0baf5deeb7030d90e43994cfeb19a6c70 /src
parent2bc97b20993b36ff8f996a4afec1e3efa3e4748d (diff)
downloadrneovim-c40dff6453a3f4655981ba7a49dbcace0240f5fc.tar.gz
rneovim-c40dff6453a3f4655981ba7a49dbcace0240f5fc.tar.bz2
rneovim-c40dff6453a3f4655981ba7a49dbcace0240f5fc.zip
Remove :open command
From the documentation itself: :[range]o[pen] Works like |:visual|: end Ex mode. {Vi: start editing in open mode} ... Vim does not support open mode, since it's not really useful. For those situations where ":open" would start open mode Vim will leave Ex mode, which allows executing the same commands, but updates the whole screen instead of only one line. Part of the reason behind this is to make removing vi_diff.txt easier, although it's also because :open is not too useful. Helped-by: @fdinoff Helped-by: @dsummersl Helped-by: @mhinz Helped-by: @justinmk
Diffstat (limited to 'src')
-rw-r--r--src/nvim/ex_cmds.lua6
-rw-r--r--src/nvim/ex_docmd.c34
2 files changed, 0 insertions, 40 deletions
diff --git a/src/nvim/ex_cmds.lua b/src/nvim/ex_cmds.lua
index 77f7dba81b..50814c4eb4 100644
--- a/src/nvim/ex_cmds.lua
+++ b/src/nvim/ex_cmds.lua
@@ -1754,12 +1754,6 @@ return {
func='ex_menu',
},
{
- command='open',
- flags=bit.bor(RANGE, BANG, EXTRA),
- addr_type=ADDR_LINES,
- func='ex_open',
- },
- {
command='oldfiles',
flags=bit.bor(BANG, TRLBAR, SBOXOK, CMDWIN),
addr_type=ADDR_LINES,
diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c
index 70cf5fd029..7b5e3939f2 100644
--- a/src/nvim/ex_docmd.c
+++ b/src/nvim/ex_docmd.c
@@ -6467,40 +6467,6 @@ static void ex_find(exarg_T *eap)
}
/*
- * ":open" simulation: for now just work like ":visual".
- */
-static void ex_open(exarg_T *eap)
-{
- regmatch_T regmatch;
- char_u *p;
-
- curwin->w_cursor.lnum = eap->line2;
- beginline(BL_SOL | BL_FIX);
- if (*eap->arg == '/') {
- /* ":open /pattern/": put cursor in column found with pattern */
- ++eap->arg;
- p = skip_regexp(eap->arg, '/', p_magic, NULL);
- *p = NUL;
- regmatch.regprog = vim_regcomp(eap->arg, p_magic ? RE_MAGIC : 0);
- if (regmatch.regprog != NULL) {
- regmatch.rm_ic = p_ic;
- p = get_cursor_line_ptr();
- if (vim_regexec(&regmatch, p, (colnr_T)0))
- curwin->w_cursor.col = (colnr_T)(regmatch.startp[0] - p);
- else
- EMSG(_(e_nomatch));
- vim_regfree(regmatch.regprog);
- }
- /* Move to the NUL, ignore any other arguments. */
- eap->arg += STRLEN(eap->arg);
- }
- check_cursor();
-
- eap->cmdidx = CMD_visual;
- do_exedit(eap, NULL);
-}
-
-/*
* ":edit", ":badd", ":visual".
*/
static void ex_edit(exarg_T *eap)