mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
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.
This commit is contained in:
@@ -635,11 +635,14 @@ stuffReadbuffLen(s, len)
|
|||||||
/*
|
/*
|
||||||
* Stuff "s" into the stuff buffer, leaving special key codes unmodified and
|
* Stuff "s" into the stuff buffer, leaving special key codes unmodified and
|
||||||
* escaping other K_SPECIAL and CSI bytes.
|
* escaping other K_SPECIAL and CSI bytes.
|
||||||
|
* Change CR, LF and ESC into a space.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
stuffReadbuffSpec(s)
|
stuffReadbuffSpec(s)
|
||||||
char_u *s;
|
char_u *s;
|
||||||
{
|
{
|
||||||
|
int c;
|
||||||
|
|
||||||
while (*s != NUL)
|
while (*s != NUL)
|
||||||
{
|
{
|
||||||
if (*s == K_SPECIAL && s[1] != NUL && s[2] != NUL)
|
if (*s == K_SPECIAL && s[1] != NUL && s[2] != NUL)
|
||||||
@@ -649,11 +652,16 @@ stuffReadbuffSpec(s)
|
|||||||
s += 3;
|
s += 3;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
#ifdef FEAT_MBYTE
|
#ifdef FEAT_MBYTE
|
||||||
stuffcharReadbuff(mb_ptr2char_adv(&s));
|
c = mb_ptr2char_adv(&s);
|
||||||
#else
|
#else
|
||||||
stuffcharReadbuff(*s++);
|
c = *s++;
|
||||||
#endif
|
#endif
|
||||||
|
if (c == CAR || c == NL || c == ESC)
|
||||||
|
c = ' ';
|
||||||
|
stuffcharReadbuff(c);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@@ -714,6 +714,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 */
|
||||||
|
/**/
|
||||||
|
168,
|
||||||
/**/
|
/**/
|
||||||
167,
|
167,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user