diff options
author | Bram Moolenaar <Bram@vim.org> | 2010-05-14 17:32:58 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2010-05-14 17:32:58 +0200 |
commit | 6af05063707668d28261a5e79cd7851c10586a60 (patch) | |
tree | 2793d50f9c46e9d04eb04323b3214c4dcf4af8e4 /src | |
parent | 2321c9255e2330439e821d77fe828e5ce8c9d499 (diff) | |
download | vim-git-6af05063707668d28261a5e79cd7851c10586a60.tar.gz |
updated for version 7.2.426v7.2.426
Problem: Commas in 'langmap' are not always handled correctly.
Solution: Require commas to be backslash escaped. (James Vega)
Diffstat (limited to 'src')
-rw-r--r-- | src/option.c | 38 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 23 insertions, 17 deletions
diff --git a/src/option.c b/src/option.c index a59beed7f..f93d839cc 100644 --- a/src/option.c +++ b/src/option.c @@ -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,26 +10444,33 @@ langmap_set() #else from = p[0]; #endif + to = NUL; if (p2 == NULL) { mb_ptr_adv(p); - if (p[0] == '\\') - ++p; + if (p[0] != ',') + { + if (p[0] == '\\') + ++p; #ifdef FEAT_MBYTE - to = (*mb_ptr2char)(p); + to = (*mb_ptr2char)(p); #else - to = p[0]; + to = p[0]; #endif + } } else { - if (p2[0] == '\\') - ++p2; + if (p2[0] != ',') + { + if (p2[0] == '\\') + ++p2; #ifdef FEAT_MBYTE - to = (*mb_ptr2char)(p2); + to = (*mb_ptr2char)(p2); #else - to = p2[0]; + to = p2[0]; #endif + } } if (to == NUL) { @@ -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 == ';') diff --git a/src/version.c b/src/version.c index 5cda9f9e1..0572f97a9 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 */ /**/ + 426, +/**/ 425, /**/ 424, |