0
0
mirror of https://github.com/vim/vim.git synced 2025-10-03 05:14:07 -04:00

updated for version 7.2.426

Problem:    Commas in 'langmap' are not always handled correctly.
Solution:   Require commas to be backslash escaped. (James Vega)
This commit is contained in:
Bram Moolenaar
2010-05-14 17:32:58 +02:00
parent 2321c9255e
commit 6af0506370
2 changed files with 23 additions and 17 deletions

View File

@@ -10432,6 +10432,11 @@ langmap_set()
p2 = NULL; /* aAbBcCdD form, p2 is NULL */
while (p[0])
{
if (p[0] == ',')
{
++p;
break;
}
if (p[0] == '\\' && p[1] != NUL)
++p;
#ifdef FEAT_MBYTE
@@ -10439,9 +10444,12 @@ langmap_set()
#else
from = p[0];
#endif
to = NUL;
if (p2 == NULL)
{
mb_ptr_adv(p);
if (p[0] != ',')
{
if (p[0] == '\\')
++p;
#ifdef FEAT_MBYTE
@@ -10450,7 +10458,10 @@ langmap_set()
to = p[0];
#endif
}
}
else
{
if (p2[0] != ',')
{
if (p2[0] == '\\')
++p2;
@@ -10460,6 +10471,7 @@ langmap_set()
to = p2[0];
#endif
}
}
if (to == NUL)
{
EMSG2(_("E357: 'langmap': Matching character missing for %s"),
@@ -10476,15 +10488,7 @@ langmap_set()
/* Advance to next pair */
mb_ptr_adv(p);
if (p2 == NULL)
{
if (p[0] == ',')
{
++p;
break;
}
}
else
if (p2 != NULL)
{
mb_ptr_adv(p2);
if (*p == ';')

View File

@@ -681,6 +681,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
426,
/**/
425,
/**/