summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2010-01-27 16:31:13 +0100
committerBram Moolenaar <Bram@vim.org>2010-01-27 16:31:13 +0100
commit38ef43b262cbbea63b4ec8cadd8368314af26164 (patch)
treecde35148201f775a319e2a250778596d9faa6eb3
parent5075aad6a8ec0f8640f4b873a619e42a182cc88d (diff)
downloadvim-git-7.2.346.tar.gz
updated for version 7.2.346v7.2.346
Problem: Repeating a command with @: causes a mapping to be applied twice. Solution: Do not remap characters inserted in the typeahead buffer. (Kana Natsuno)
-rw-r--r--src/ops.c15
-rw-r--r--src/version.c2
2 files changed, 13 insertions, 4 deletions
diff --git a/src/ops.c b/src/ops.c
index 4b32b5733..606ce071b 100644
--- a/src/ops.c
+++ b/src/ops.c
@@ -1301,10 +1301,16 @@ put_reedit_in_typebuf(silent)
}
}
+/*
+ * Insert register contents "s" into the typeahead buffer, so that it will be
+ * executed again.
+ * When "esc" is TRUE it is to be taken literally: Escape CSI characters and
+ * no remapping.
+ */
static int
put_in_typebuf(s, esc, colon, silent)
char_u *s;
- int esc; /* Escape CSI characters */
+ int esc;
int colon; /* add ':' before the line */
int silent;
{
@@ -1312,7 +1318,7 @@ put_in_typebuf(s, esc, colon, silent)
put_reedit_in_typebuf(silent);
if (colon)
- retval = ins_typebuf((char_u *)"\n", REMAP_YES, 0, TRUE, silent);
+ retval = ins_typebuf((char_u *)"\n", REMAP_NONE, 0, TRUE, silent);
if (retval == OK)
{
char_u *p;
@@ -1324,12 +1330,13 @@ put_in_typebuf(s, esc, colon, silent)
if (p == NULL)
retval = FAIL;
else
- retval = ins_typebuf(p, REMAP_YES, 0, TRUE, silent);
+ retval = ins_typebuf(p, esc ? REMAP_NONE : REMAP_YES,
+ 0, TRUE, silent);
if (esc)
vim_free(p);
}
if (colon && retval == OK)
- retval = ins_typebuf((char_u *)":", REMAP_YES, 0, TRUE, silent);
+ retval = ins_typebuf((char_u *)":", REMAP_NONE, 0, TRUE, silent);
return retval;
}
diff --git a/src/version.c b/src/version.c
index 1fea40f14..f79e92e2e 100644
--- a/src/version.c
+++ b/src/version.c
@@ -682,6 +682,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 346,
+/**/
345,
/**/
344,