components/vim/vim72-patches/7.2.426
changeset 198 172fc01ce997
equal deleted inserted replaced
197:fd801ec0737c 198:172fc01ce997
       
     1 To: [email protected]
       
     2 Subject: Patch 7.2.426
       
     3 Fcc: outbox
       
     4 From: Bram Moolenaar <[email protected]>
       
     5 Mime-Version: 1.0
       
     6 Content-Type: text/plain; charset=UTF-8
       
     7 Content-Transfer-Encoding: 8bit
       
     8 ------------
       
     9 
       
    10 Patch 7.2.426
       
    11 Problem:    Commas in 'langmap' are not always handled correctly.
       
    12 Solution:   Require commas to be backslash escaped. (James Vega)
       
    13 Files:	    src/option.c
       
    14 
       
    15 
       
    16 *** ../vim-7.2.425/src/option.c	2010-05-13 13:12:01.000000000 +0200
       
    17 --- src/option.c	2010-05-14 16:04:21.000000000 +0200
       
    18 ***************
       
    19 *** 10432,10437 ****
       
    20 --- 10432,10442 ----
       
    21   	    p2 = NULL;	    /* aAbBcCdD form, p2 is NULL */
       
    22   	while (p[0])
       
    23   	{
       
    24 + 	    if (p[0] == ',')
       
    25 + 	    {
       
    26 + 		++p;
       
    27 + 		break;
       
    28 + 	    }
       
    29   	    if (p[0] == '\\' && p[1] != NUL)
       
    30   		++p;
       
    31   #ifdef FEAT_MBYTE
       
    32 ***************
       
    33 *** 10439,10464 ****
       
    34   #else
       
    35   	    from = p[0];
       
    36   #endif
       
    37   	    if (p2 == NULL)
       
    38   	    {
       
    39   		mb_ptr_adv(p);
       
    40 ! 		if (p[0] == '\\')
       
    41 ! 		    ++p;
       
    42   #ifdef FEAT_MBYTE
       
    43 ! 		to = (*mb_ptr2char)(p);
       
    44   #else
       
    45 ! 		to = p[0];
       
    46   #endif
       
    47   	    }
       
    48   	    else
       
    49   	    {
       
    50 ! 		if (p2[0] == '\\')
       
    51 ! 		    ++p2;
       
    52   #ifdef FEAT_MBYTE
       
    53 ! 		to = (*mb_ptr2char)(p2);
       
    54   #else
       
    55 ! 		to = p2[0];
       
    56   #endif
       
    57   	    }
       
    58   	    if (to == NUL)
       
    59   	    {
       
    60 --- 10444,10476 ----
       
    61   #else
       
    62   	    from = p[0];
       
    63   #endif
       
    64 + 	    to = NUL;
       
    65   	    if (p2 == NULL)
       
    66   	    {
       
    67   		mb_ptr_adv(p);
       
    68 ! 		if (p[0] != ',')
       
    69 ! 		{
       
    70 ! 		    if (p[0] == '\\')
       
    71 ! 			++p;
       
    72   #ifdef FEAT_MBYTE
       
    73 ! 		    to = (*mb_ptr2char)(p);
       
    74   #else
       
    75 ! 		    to = p[0];
       
    76   #endif
       
    77 + 		}
       
    78   	    }
       
    79   	    else
       
    80   	    {
       
    81 ! 		if (p2[0] != ',')
       
    82 ! 		{
       
    83 ! 		    if (p2[0] == '\\')
       
    84 ! 			++p2;
       
    85   #ifdef FEAT_MBYTE
       
    86 ! 		    to = (*mb_ptr2char)(p2);
       
    87   #else
       
    88 ! 		    to = p2[0];
       
    89   #endif
       
    90 + 		}
       
    91   	    }
       
    92   	    if (to == NUL)
       
    93   	    {
       
    94 ***************
       
    95 *** 10476,10490 ****
       
    96   
       
    97   	    /* Advance to next pair */
       
    98   	    mb_ptr_adv(p);
       
    99 ! 	    if (p2 == NULL)
       
   100 ! 	    {
       
   101 ! 		if (p[0] == ',')
       
   102 ! 		{
       
   103 ! 		    ++p;
       
   104 ! 		    break;
       
   105 ! 		}
       
   106 ! 	    }
       
   107 ! 	    else
       
   108   	    {
       
   109   		mb_ptr_adv(p2);
       
   110   		if (*p == ';')
       
   111 --- 10488,10494 ----
       
   112   
       
   113   	    /* Advance to next pair */
       
   114   	    mb_ptr_adv(p);
       
   115 ! 	    if (p2 != NULL)
       
   116   	    {
       
   117   		mb_ptr_adv(p2);
       
   118   		if (*p == ';')
       
   119 *** ../vim-7.2.425/src/version.c	2010-05-14 15:42:49.000000000 +0200
       
   120 --- src/version.c	2010-05-14 17:32:11.000000000 +0200
       
   121 ***************
       
   122 *** 683,684 ****
       
   123 --- 683,686 ----
       
   124   {   /* Add new patch number below this line */
       
   125 + /**/
       
   126 +     426,
       
   127   /**/
       
   128 
       
   129 -- 
       
   130 On the other hand, you have different fingers.
       
   131                                       -- Steven Wright
       
   132 
       
   133  /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
       
   134 ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
       
   135 \\\        download, build and distribute -- http://www.A-A-P.org        ///
       
   136  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///