summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2011-04-28 17:30:09 +0200
committerBram Moolenaar <Bram@vim.org>2011-04-28 17:30:09 +0200
commit877b97b9531b70ee05b2c3338354980159e4f67b (patch)
tree12f1fce2628e709ea59ce9a4b9945008fa43a706 /src
parentd88e02def5d100a6c5dbc4bb0ec79ee13c88ca5a (diff)
downloadvim-877b97b9531b70ee05b2c3338354980159e4f67b.zip
updated for version 7.3.168
Problem: When the second argument of input() contains a CR the text up to that is used without asking the user. (Yasuhiro Matsumoto) Solution: Change CR, NL and ESC in the text to a space.
Diffstat (limited to 'src')
-rw-r--r--src/getchar.c12
-rw-r--r--src/version.c2
2 files changed, 12 insertions, 2 deletions
diff --git a/src/getchar.c b/src/getchar.c
index 1073d80d6..0437e94af 100644
--- a/src/getchar.c
+++ b/src/getchar.c
@@ -635,11 +635,14 @@ stuffReadbuffLen(s, len)
/*
* Stuff "s" into the stuff buffer, leaving special key codes unmodified and
* escaping other K_SPECIAL and CSI bytes.
+ * Change CR, LF and ESC into a space.
*/
void
stuffReadbuffSpec(s)
char_u *s;
{
+ int c;
+
while (*s != NUL)
{
if (*s == K_SPECIAL && s[1] != NUL && s[2] != NUL)
@@ -649,11 +652,16 @@ stuffReadbuffSpec(s)
s += 3;
}
else
+ {
#ifdef FEAT_MBYTE
- stuffcharReadbuff(mb_ptr2char_adv(&s));
+ c = mb_ptr2char_adv(&s);
#else
- stuffcharReadbuff(*s++);
+ c = *s++;
#endif
+ if (c == CAR || c == NL || c == ESC)
+ c = ' ';
+ stuffcharReadbuff(c);
+ }
}
}
#endif
diff --git a/src/version.c b/src/version.c
index ac145160d..d4809d43a 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 */
/**/
+ 168,
+/**/
167,
/**/
166,