summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ex_docmd.c36
-rw-r--r--src/globals.h3
-rw-r--r--src/version.c2
3 files changed, 30 insertions, 11 deletions
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index b67c00be5..d90e96442 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -2424,25 +2424,39 @@ do_one_cmd(cmdlinep, sourcing,
if ( (ea.argt & REGSTR)
&& *ea.arg != NUL
#ifdef FEAT_USR_CMDS
- && valid_yank_reg(*ea.arg, (ea.cmdidx != CMD_put
- && USER_CMDIDX(ea.cmdidx)))
/* Do not allow register = for user commands */
&& (!USER_CMDIDX(ea.cmdidx) || *ea.arg != '=')
-#else
- && valid_yank_reg(*ea.arg, ea.cmdidx != CMD_put)
#endif
&& !((ea.argt & COUNT) && VIM_ISDIGIT(*ea.arg)))
{
- ea.regname = *ea.arg++;
-#ifdef FEAT_EVAL
- /* for '=' register: accept the rest of the line as an expression */
- if (ea.arg[-1] == '=' && ea.arg[0] != NUL)
+#ifndef FEAT_CLIPBOARD
+ /* check these explicitly for a more specific error message */
+ if (*ea.arg == '*' || *ea.arg == '+')
{
- set_expr_line(vim_strsave(ea.arg));
- ea.arg += STRLEN(ea.arg);
+ errormsg = (char_u *)_(e_invalidreg);
+ goto doend;
}
#endif
- ea.arg = skipwhite(ea.arg);
+ if (
+#ifdef FEAT_USR_CMDS
+ valid_yank_reg(*ea.arg, (ea.cmdidx != CMD_put
+ && USER_CMDIDX(ea.cmdidx)))
+#else
+ valid_yank_reg(*ea.arg, ea.cmdidx != CMD_put)
+#endif
+ )
+ {
+ ea.regname = *ea.arg++;
+#ifdef FEAT_EVAL
+ /* for '=' register: accept the rest of the line as an expression */
+ if (ea.arg[-1] == '=' && ea.arg[0] != NUL)
+ {
+ set_expr_line(vim_strsave(ea.arg));
+ ea.arg += STRLEN(ea.arg);
+ }
+#endif
+ ea.arg = skipwhite(ea.arg);
+ }
}
/*
diff --git a/src/globals.h b/src/globals.h
index 3685fc732..4b5544686 100644
--- a/src/globals.h
+++ b/src/globals.h
@@ -1561,6 +1561,9 @@ EXTERN char_u e_bufloaded[] INIT(= N_("E139: File is loaded in another buffer"))
(defined(FEAT_INS_EXPAND) && defined(FEAT_COMPL_FUNC))
EXTERN char_u e_notset[] INIT(= N_("E764: Option '%s' is not set"));
#endif
+#ifndef FEAT_CLIPBOARD
+EXTERN char_u e_invalidreg[] INIT(= N_("E850: Invalid register name"));
+#endif
#ifdef MACOS_X_UNIX
EXTERN short disallow_gui INIT(= FALSE);
diff --git a/src/version.c b/src/version.c
index 51e2cf972..b99456a53 100644
--- a/src/version.c
+++ b/src/version.c
@@ -715,6 +715,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 171,
+/**/
170,
/**/
169,