summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvimboss <devnull@localhost>2006-11-07 17:43:47 +0000
committervimboss <devnull@localhost>2006-11-07 17:43:47 +0000
commitb44d4d90ca7ccac5eadf3ff7ef689a9f819f2312 (patch)
tree2a02f359356427a803b40f4b1e1c888ae14f0390
parent659c24097c0b9c6e9a1855ab45d7dba05baed674 (diff)
downloadvim-b44d4d90ca7ccac5eadf3ff7ef689a9f819f2312.tar.gz
updated for version 7.0-160v7.0.160v7-0-160
-rw-r--r--src/ex_docmd.c5
-rw-r--r--src/normal.c2
-rw-r--r--src/ops.c39
-rw-r--r--src/proto/ops.pro2
-rw-r--r--src/version.c2
5 files changed, 28 insertions, 22 deletions
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index 4183e910..3e97f951 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -8219,8 +8219,9 @@ ex_at(eap)
c = *eap->arg;
if (c == NUL || (c == '*' && *eap->cmd == '*'))
c = '@';
- /* put the register in mapbuf */
- if (do_execreg(c, TRUE, vim_strchr(p_cpo, CPO_EXECBUF) != NULL) == FAIL)
+ /* 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)
{
beep_flush();
}
diff --git a/src/normal.c b/src/normal.c
index 3d1a5a66..94d98996 100644
--- a/src/normal.c
+++ b/src/normal.c
@@ -8860,7 +8860,7 @@ nv_at(cap)
#endif
while (cap->count1-- && !got_int)
{
- if (do_execreg(cap->nchar, FALSE, FALSE) == FAIL)
+ if (do_execreg(cap->nchar, FALSE, FALSE, FALSE) == FAIL)
{
clearopbeep(cap->oap);
break;
diff --git a/src/ops.c b/src/ops.c
index 4f45aea4..2091ef58 100644
--- a/src/ops.c
+++ b/src/ops.c
@@ -95,8 +95,8 @@ static void shift_block __ARGS((oparg_T *oap, int amount));
static void block_insert __ARGS((oparg_T *oap, char_u *s, int b_insert, struct block_def*bdp));
#endif
static int stuff_yank __ARGS((int, char_u *));
-static void put_reedit_in_typebuf __ARGS((void));
-static int put_in_typebuf __ARGS((char_u *s, int colon));
+static void put_reedit_in_typebuf __ARGS((int silent));
+static int put_in_typebuf __ARGS((char_u *s, int colon, int silent));
static void stuffescaped __ARGS((char_u *arg, int literally));
#ifdef FEAT_MBYTE
static void mb_adjust_opend __ARGS((oparg_T *oap));
@@ -1120,10 +1120,11 @@ stuff_yank(regname, p)
* return FAIL for failure, OK otherwise
*/
int
-do_execreg(regname, colon, addcr)
+do_execreg(regname, colon, addcr, silent)
int regname;
int colon; /* insert ':' before each line */
int addcr; /* always add '\n' to end of line */
+ int silent; /* set "silent" flag in typeahead buffer */
{
static int lastc = NUL;
long i;
@@ -1173,9 +1174,9 @@ do_execreg(regname, colon, addcr)
/* When in Visual mode "'<,'>" will be prepended to the command.
* Remove it when it's already there. */
if (VIsual_active && STRNCMP(p, "'<,'>", 5) == 0)
- retval = put_in_typebuf(p + 5, TRUE);
+ retval = put_in_typebuf(p + 5, TRUE, silent);
else
- retval = put_in_typebuf(p, TRUE);
+ retval = put_in_typebuf(p, TRUE, silent);
}
vim_free(p);
}
@@ -1186,7 +1187,7 @@ do_execreg(regname, colon, addcr)
p = get_expr_line();
if (p == NULL)
return FAIL;
- retval = put_in_typebuf(p, colon);
+ retval = put_in_typebuf(p, colon, silent);
vim_free(p);
}
#endif
@@ -1198,7 +1199,7 @@ do_execreg(regname, colon, addcr)
EMSG(_(e_noinstext));
return FAIL;
}
- retval = put_in_typebuf(p, colon);
+ retval = put_in_typebuf(p, colon, silent);
vim_free(p);
}
else
@@ -1213,20 +1214,20 @@ do_execreg(regname, colon, addcr)
/*
* Insert lines into typeahead buffer, from last one to first one.
*/
- put_reedit_in_typebuf();
+ put_reedit_in_typebuf(silent);
for (i = y_current->y_size; --i >= 0; )
{
/* insert NL between lines and after last line if type is MLINE */
if (y_current->y_type == MLINE || i < y_current->y_size - 1
|| addcr)
{
- if (ins_typebuf((char_u *)"\n", remap, 0, TRUE, FALSE) == FAIL)
+ if (ins_typebuf((char_u *)"\n", remap, 0, TRUE, silent) == FAIL)
return FAIL;
}
- if (ins_typebuf(y_current->y_array[i], remap, 0, TRUE, FALSE)
+ if (ins_typebuf(y_current->y_array[i], remap, 0, TRUE, silent)
== FAIL)
return FAIL;
- if (colon && ins_typebuf((char_u *)":", remap, 0, TRUE, FALSE)
+ if (colon && ins_typebuf((char_u *)":", remap, 0, TRUE, silent)
== FAIL)
return FAIL;
}
@@ -1240,7 +1241,8 @@ do_execreg(regname, colon, addcr)
* used only after other typeahead has been processed.
*/
static void
-put_reedit_in_typebuf()
+put_reedit_in_typebuf(silent)
+ int silent;
{
char_u buf[3];
@@ -1257,25 +1259,26 @@ put_reedit_in_typebuf()
buf[0] = restart_edit == 'I' ? 'i' : restart_edit;
buf[1] = NUL;
}
- if (ins_typebuf(buf, REMAP_NONE, 0, TRUE, FALSE) == OK)
+ if (ins_typebuf(buf, REMAP_NONE, 0, TRUE, silent) == OK)
restart_edit = NUL;
}
}
static int
-put_in_typebuf(s, colon)
+put_in_typebuf(s, colon, silent)
char_u *s;
int colon; /* add ':' before the line */
+ int silent;
{
int retval = OK;
- put_reedit_in_typebuf();
+ put_reedit_in_typebuf(silent);
if (colon)
- retval = ins_typebuf((char_u *)"\n", REMAP_YES, 0, TRUE, FALSE);
+ retval = ins_typebuf((char_u *)"\n", REMAP_YES, 0, TRUE, silent);
if (retval == OK)
- retval = ins_typebuf(s, REMAP_YES, 0, TRUE, FALSE);
+ retval = ins_typebuf(s, REMAP_YES, 0, TRUE, silent);
if (colon && retval == OK)
- retval = ins_typebuf((char_u *)":", REMAP_YES, 0, TRUE, FALSE);
+ retval = ins_typebuf((char_u *)":", REMAP_YES, 0, TRUE, silent);
return retval;
}
diff --git a/src/proto/ops.pro b/src/proto/ops.pro
index 881f9aeb..9a228cc6 100644
--- a/src/proto/ops.pro
+++ b/src/proto/ops.pro
@@ -17,7 +17,7 @@ extern void *get_register __ARGS((int name, int copy));
extern void put_register __ARGS((int name, void *reg));
extern int yank_register_mline __ARGS((int regname));
extern int do_record __ARGS((int c));
-extern int do_execreg __ARGS((int regname, int colon, int addcr));
+extern int do_execreg __ARGS((int regname, int colon, int addcr, int silent));
extern int insert_reg __ARGS((int regname, int literally));
extern int get_spec_reg __ARGS((int regname, char_u **argp, int *allocated, int errmsg));
extern int cmdline_paste_reg __ARGS((int regname, int literally, int remcr));
diff --git a/src/version.c b/src/version.c
index cc123b22..2c60189d 100644
--- a/src/version.c
+++ b/src/version.c
@@ -667,6 +667,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 160,
+/**/
159,
/**/
158,