diff options
-rw-r--r-- | runtime/doc/cmdline.txt | 5 | ||||
-rw-r--r-- | runtime/doc/index.txt | 1 | ||||
-rw-r--r-- | runtime/doc/options.txt | 3 | ||||
-rw-r--r-- | runtime/doc/repeat.txt | 4 | ||||
-rw-r--r-- | src/nvim/ex_cmds.c | 8 | ||||
-rw-r--r-- | src/nvim/ex_cmds.lua | 7 | ||||
-rw-r--r-- | src/nvim/ex_docmd.c | 24 | ||||
-rw-r--r-- | src/nvim/option_defs.h | 5 |
8 files changed, 20 insertions, 37 deletions
diff --git a/runtime/doc/cmdline.txt b/runtime/doc/cmdline.txt index 88d0c31f96..932d230a59 100644 --- a/runtime/doc/cmdline.txt +++ b/runtime/doc/cmdline.txt @@ -703,10 +703,7 @@ Visual Mode and Range *v_:* history for repeating a command on different Visually selected lines. When Visual mode was already ended, a short way to use the - Visual area for a range is `:*`. This requires that "*" does - not appear in 'cpo', see |cpo-star|. Otherwise you will have - to type `:'<,'>` - + Visual area for a range is `:*`. ============================================================================== 5. Ex command-line flags *ex-flags* diff --git a/runtime/doc/index.txt b/runtime/doc/index.txt index 6c12bfff15..2338906db2 100644 --- a/runtime/doc/index.txt +++ b/runtime/doc/index.txt @@ -1064,7 +1064,6 @@ tag command action ~ |:!!| :!! repeat last ":!" command |:#| :# same as ":number" |:&| :& repeat last ":substitute" -|:star| :* execute contents of a register |:<| :< shift lines one 'shiftwidth' left |:=| := print the cursor line number |:>| :> shift lines one 'shiftwidth' right diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index e9cb8350cf..69576c3572 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -1936,9 +1936,6 @@ A jump table for the options with a short description can be found at |Q_op|. + When included, a ":write file" command will reset the 'modified' flag of the buffer, even though the buffer itself may still be different from its file. - *cpo-star* - * Use ":*" in the same way as ":@". When not included, - ":*" is an alias for ":'<,'>", select the Visual area. *cpo-<* < Disable the recognition of special key codes in |<>| form in mappings, abbreviations, and the "to" part of diff --git a/runtime/doc/repeat.txt b/runtime/doc/repeat.txt index 847830af9b..0412e9fb10 100644 --- a/runtime/doc/repeat.txt +++ b/runtime/doc/repeat.txt @@ -128,14 +128,12 @@ q Stops recording. *@@* *E748* @@ Repeat the previous @{0-9a-z":*} [count] times. -:[addr]*{0-9a-z".=+} *:@* *:star* + *:@* :[addr]@{0-9a-z".=*+} Execute the contents of register {0-9a-z".=*+} as an Ex command. First set cursor at line [addr] (default is current line). When the last line in the register does not have a <CR> it will be added automatically when the 'e' flag is present in 'cpoptions'. - Note that the ":*" command is only recognized when the - '*' flag is present in 'cpoptions'. For ":@=" the last used expression is used. The result of evaluating the expression is executed as an Ex command. diff --git a/src/nvim/ex_cmds.c b/src/nvim/ex_cmds.c index 62c2d4ac98..8cfb2ce2a0 100644 --- a/src/nvim/ex_cmds.c +++ b/src/nvim/ex_cmds.c @@ -4833,18 +4833,18 @@ int find_help_tags(char_u *arg, int *num_matches, char_u ***matches, int keep_la { char_u *s, *d; int i; - static char *(mtable[]) = {"*", "g*", "[*", "]*", ":*", + static char *(mtable[]) = {"*", "g*", "[*", "]*", "/*", "/\\*", "\"*", "**", - "cpo-*", "/\\(\\)", "/\\%(\\)", + "/\\(\\)", "/\\%(\\)", "?", ":?", "?<CR>", "g?", "g?g?", "g??", "z?", "/\\?", "/\\z(\\)", "\\=", ":s\\=", "[count]", "[quotex]", "[range]", "[pattern]", "\\|", "\\%$", "s/\\~", "s/\\U", "s/\\L", "s/\\1", "s/\\2", "s/\\3", "s/\\9"}; - static char *(rtable[]) = {"star", "gstar", "[star", "]star", ":star", + static char *(rtable[]) = {"star", "gstar", "[star", "]star", "/star", "/\\\\star", "quotestar", "starstar", - "cpo-star", "/\\\\(\\\\)", "/\\\\%(\\\\)", + "/\\\\(\\\\)", "/\\\\%(\\\\)", "?", ":?", "?<CR>", "g?", "g?g?", "g??", "z?", "/\\\\?", "/\\\\z(\\\\)", "\\\\=", ":s\\\\=", "\\[count]", "\\[quotex]", "\\[range]", diff --git a/src/nvim/ex_cmds.lua b/src/nvim/ex_cmds.lua index 5f60b8cb09..011b3ce611 100644 --- a/src/nvim/ex_cmds.lua +++ b/src/nvim/ex_cmds.lua @@ -3137,13 +3137,6 @@ return { func='do_sub', }, { - command='*', - enum='CMD_star', - flags=bit.bor(RANGE, WHOLEFOLD, EXTRA, TRLBAR, CMDWIN), - addr_type=ADDR_LINES, - func='ex_at', - }, - { command='<', enum='CMD_lshift', flags=bit.bor(RANGE, WHOLEFOLD, COUNT, EXFLAGS, TRLBAR, CMDWIN, MODIFY), diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c index 289bb85f4d..1b616bb579 100644 --- a/src/nvim/ex_docmd.c +++ b/src/nvim/ex_docmd.c @@ -1489,8 +1489,9 @@ static char_u * do_one_cmd(char_u **cmdlinep, cmd = ea.cmd; ea.cmd = skip_range(ea.cmd, NULL); - if (*ea.cmd == '*' && vim_strchr(p_cpo, CPO_STAR) == NULL) + if (*ea.cmd == '*') { ea.cmd = skipwhite(ea.cmd + 1); + } p = find_command(&ea, NULL); /* @@ -1605,7 +1606,7 @@ static char_u * do_one_cmd(char_u **cmdlinep, ++ea.addr_count; } /* '*' - visual area */ - else if (*ea.cmd == '*' && vim_strchr(p_cpo, CPO_STAR) == NULL) { + else if (*ea.cmd == '*') { pos_T *fp; if (ea.addr_type != ADDR_LINES) { @@ -2373,7 +2374,7 @@ static char_u *find_command(exarg_T *eap, int *full) ++p; /* check for non-alpha command */ - if (p == eap->cmd && vim_strchr((char_u *)"@*!=><&~#", *p) != NULL) + if (p == eap->cmd && vim_strchr((char_u *)"@!=><&~#", *p) != NULL) ++p; len = (int)(p - eap->cmd); if (*eap->cmd == 'd' && (p[-1] == 'l' || p[-1] == 'p')) { @@ -4096,11 +4097,10 @@ void separate_nextcmd(exarg_T *eap) (void)skip_expr(&p); } /* Check for '"': start of comment or '|': next command */ - /* :@" and :*" do not start a comment! + /* :@" does not start a comment! * :redir @" doesn't either. */ else if ((*p == '"' && !(eap->argt & NOTRLCOM) - && ((eap->cmdidx != CMD_at && eap->cmdidx != CMD_star) - || p != eap->arg) + && (eap->cmdidx != CMD_at || p != eap->arg) && (eap->cmdidx != CMD_redir || p != eap->arg + 1 || p[-1] != '@')) || *p == '|' || *p == '\n') { @@ -7144,20 +7144,20 @@ static void ex_join(exarg_T *eap) } /* - * ":[addr]@r" or ":[addr]*r": execute register + * ":[addr]@r": execute register */ static void ex_at(exarg_T *eap) { - int c; int prev_len = typebuf.tb_len; curwin->w_cursor.lnum = eap->line2; - - /* get the register name. No name means to use the previous one */ - c = *eap->arg; - if (c == NUL || (c == '*' && *eap->cmd == '*')) + // Get the register name. No name means use the previous one. + int c = *eap->arg; + if (c == NUL) { c = '@'; + } + /* Put the register in the typeahead buffer with the "silent" flag. */ if (do_execreg(c, TRUE, vim_strchr(p_cpo, CPO_EXECBUF) != NULL, TRUE) == FAIL) { diff --git a/src/nvim/option_defs.h b/src/nvim/option_defs.h index 278b3f0872..daecfcdb8b 100644 --- a/src/nvim/option_defs.h +++ b/src/nvim/option_defs.h @@ -126,7 +126,6 @@ #define CPO_DOLLAR '$' #define CPO_FILTER '!' #define CPO_MATCH '%' -#define CPO_STAR '*' /* ":*" means ":@" */ #define CPO_PLUS '+' /* ":write file" resets 'modified' */ #define CPO_MINUS '-' /* "9-" fails at and before line 9 */ #define CPO_SPECI '<' /* don't recognize <> in mappings */ @@ -143,9 +142,9 @@ * cursor would not move */ /* default values for Vim, Vi and POSIX */ #define CPO_VIM "aABceFs" -#define CPO_VI "aAbBcCdDeEfFiIjJkKlLmMnoOpPqrRsStuvWxXyZ$!%*-+<>;" +#define CPO_VI "aAbBcCdDeEfFiIjJkKlLmMnoOpPqrRsStuvWxXyZ$!%-+<>;" #define CPO_ALL \ - "aAbBcCdDeEfFiIjJkKlLmMnoOpPqrRsStuvWxXyZ$!%*-+<>#{|&/\\.;" + "aAbBcCdDeEfFiIjJkKlLmMnoOpPqrRsStuvWxXyZ$!%-+<>#{|&/\\.;" /* characters for p_ww option: */ #define WW_ALL "bshl<>[],~" |