mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
updated for version 7.0-160
This commit is contained in:
@@ -8219,8 +8219,9 @@ ex_at(eap)
|
|||||||
c = *eap->arg;
|
c = *eap->arg;
|
||||||
if (c == NUL || (c == '*' && *eap->cmd == '*'))
|
if (c == NUL || (c == '*' && *eap->cmd == '*'))
|
||||||
c = '@';
|
c = '@';
|
||||||
/* put the register in mapbuf */
|
/* Put the register in the typeahead buffer with the "silent" flag. */
|
||||||
if (do_execreg(c, TRUE, vim_strchr(p_cpo, CPO_EXECBUF) != NULL) == FAIL)
|
if (do_execreg(c, TRUE, vim_strchr(p_cpo, CPO_EXECBUF) != NULL, TRUE)
|
||||||
|
== FAIL)
|
||||||
{
|
{
|
||||||
beep_flush();
|
beep_flush();
|
||||||
}
|
}
|
||||||
|
@@ -8860,7 +8860,7 @@ nv_at(cap)
|
|||||||
#endif
|
#endif
|
||||||
while (cap->count1-- && !got_int)
|
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);
|
clearopbeep(cap->oap);
|
||||||
break;
|
break;
|
||||||
|
39
src/ops.c
39
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));
|
static void block_insert __ARGS((oparg_T *oap, char_u *s, int b_insert, struct block_def*bdp));
|
||||||
#endif
|
#endif
|
||||||
static int stuff_yank __ARGS((int, char_u *));
|
static int stuff_yank __ARGS((int, char_u *));
|
||||||
static void put_reedit_in_typebuf __ARGS((void));
|
static void put_reedit_in_typebuf __ARGS((int silent));
|
||||||
static int put_in_typebuf __ARGS((char_u *s, int colon));
|
static int put_in_typebuf __ARGS((char_u *s, int colon, int silent));
|
||||||
static void stuffescaped __ARGS((char_u *arg, int literally));
|
static void stuffescaped __ARGS((char_u *arg, int literally));
|
||||||
#ifdef FEAT_MBYTE
|
#ifdef FEAT_MBYTE
|
||||||
static void mb_adjust_opend __ARGS((oparg_T *oap));
|
static void mb_adjust_opend __ARGS((oparg_T *oap));
|
||||||
@@ -1120,10 +1120,11 @@ stuff_yank(regname, p)
|
|||||||
* return FAIL for failure, OK otherwise
|
* return FAIL for failure, OK otherwise
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
do_execreg(regname, colon, addcr)
|
do_execreg(regname, colon, addcr, silent)
|
||||||
int regname;
|
int regname;
|
||||||
int colon; /* insert ':' before each line */
|
int colon; /* insert ':' before each line */
|
||||||
int addcr; /* always add '\n' to end of line */
|
int addcr; /* always add '\n' to end of line */
|
||||||
|
int silent; /* set "silent" flag in typeahead buffer */
|
||||||
{
|
{
|
||||||
static int lastc = NUL;
|
static int lastc = NUL;
|
||||||
long i;
|
long i;
|
||||||
@@ -1173,9 +1174,9 @@ do_execreg(regname, colon, addcr)
|
|||||||
/* When in Visual mode "'<,'>" will be prepended to the command.
|
/* When in Visual mode "'<,'>" will be prepended to the command.
|
||||||
* Remove it when it's already there. */
|
* Remove it when it's already there. */
|
||||||
if (VIsual_active && STRNCMP(p, "'<,'>", 5) == 0)
|
if (VIsual_active && STRNCMP(p, "'<,'>", 5) == 0)
|
||||||
retval = put_in_typebuf(p + 5, TRUE);
|
retval = put_in_typebuf(p + 5, TRUE, silent);
|
||||||
else
|
else
|
||||||
retval = put_in_typebuf(p, TRUE);
|
retval = put_in_typebuf(p, TRUE, silent);
|
||||||
}
|
}
|
||||||
vim_free(p);
|
vim_free(p);
|
||||||
}
|
}
|
||||||
@@ -1186,7 +1187,7 @@ do_execreg(regname, colon, addcr)
|
|||||||
p = get_expr_line();
|
p = get_expr_line();
|
||||||
if (p == NULL)
|
if (p == NULL)
|
||||||
return FAIL;
|
return FAIL;
|
||||||
retval = put_in_typebuf(p, colon);
|
retval = put_in_typebuf(p, colon, silent);
|
||||||
vim_free(p);
|
vim_free(p);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -1198,7 +1199,7 @@ do_execreg(regname, colon, addcr)
|
|||||||
EMSG(_(e_noinstext));
|
EMSG(_(e_noinstext));
|
||||||
return FAIL;
|
return FAIL;
|
||||||
}
|
}
|
||||||
retval = put_in_typebuf(p, colon);
|
retval = put_in_typebuf(p, colon, silent);
|
||||||
vim_free(p);
|
vim_free(p);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -1213,20 +1214,20 @@ do_execreg(regname, colon, addcr)
|
|||||||
/*
|
/*
|
||||||
* Insert lines into typeahead buffer, from last one to first one.
|
* 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; )
|
for (i = y_current->y_size; --i >= 0; )
|
||||||
{
|
{
|
||||||
/* insert NL between lines and after last line if type is MLINE */
|
/* insert NL between lines and after last line if type is MLINE */
|
||||||
if (y_current->y_type == MLINE || i < y_current->y_size - 1
|
if (y_current->y_type == MLINE || i < y_current->y_size - 1
|
||||||
|| addcr)
|
|| 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;
|
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)
|
== FAIL)
|
||||||
return FAIL;
|
return FAIL;
|
||||||
if (colon && ins_typebuf((char_u *)":", remap, 0, TRUE, FALSE)
|
if (colon && ins_typebuf((char_u *)":", remap, 0, TRUE, silent)
|
||||||
== FAIL)
|
== FAIL)
|
||||||
return FAIL;
|
return FAIL;
|
||||||
}
|
}
|
||||||
@@ -1240,7 +1241,8 @@ do_execreg(regname, colon, addcr)
|
|||||||
* used only after other typeahead has been processed.
|
* used only after other typeahead has been processed.
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
put_reedit_in_typebuf()
|
put_reedit_in_typebuf(silent)
|
||||||
|
int silent;
|
||||||
{
|
{
|
||||||
char_u buf[3];
|
char_u buf[3];
|
||||||
|
|
||||||
@@ -1257,25 +1259,26 @@ put_reedit_in_typebuf()
|
|||||||
buf[0] = restart_edit == 'I' ? 'i' : restart_edit;
|
buf[0] = restart_edit == 'I' ? 'i' : restart_edit;
|
||||||
buf[1] = NUL;
|
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;
|
restart_edit = NUL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
put_in_typebuf(s, colon)
|
put_in_typebuf(s, colon, silent)
|
||||||
char_u *s;
|
char_u *s;
|
||||||
int colon; /* add ':' before the line */
|
int colon; /* add ':' before the line */
|
||||||
|
int silent;
|
||||||
{
|
{
|
||||||
int retval = OK;
|
int retval = OK;
|
||||||
|
|
||||||
put_reedit_in_typebuf();
|
put_reedit_in_typebuf(silent);
|
||||||
if (colon)
|
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)
|
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)
|
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;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -17,7 +17,7 @@ extern void *get_register __ARGS((int name, int copy));
|
|||||||
extern void put_register __ARGS((int name, void *reg));
|
extern void put_register __ARGS((int name, void *reg));
|
||||||
extern int yank_register_mline __ARGS((int regname));
|
extern int yank_register_mline __ARGS((int regname));
|
||||||
extern int do_record __ARGS((int c));
|
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 insert_reg __ARGS((int regname, int literally));
|
||||||
extern int get_spec_reg __ARGS((int regname, char_u **argp, int *allocated, int errmsg));
|
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));
|
extern int cmdline_paste_reg __ARGS((int regname, int literally, int remcr));
|
||||||
|
@@ -666,6 +666,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
160,
|
||||||
/**/
|
/**/
|
||||||
159,
|
159,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user