Karsten Hopp a5c1fb
To: vim-dev@vim.org
Karsten Hopp a5c1fb
Subject: Patch 7.2.426
Karsten Hopp a5c1fb
Fcc: outbox
Karsten Hopp a5c1fb
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp a5c1fb
Mime-Version: 1.0
Karsten Hopp a5c1fb
Content-Type: text/plain; charset=UTF-8
Karsten Hopp a5c1fb
Content-Transfer-Encoding: 8bit
Karsten Hopp a5c1fb
------------
Karsten Hopp a5c1fb
Karsten Hopp a5c1fb
Patch 7.2.426
Karsten Hopp a5c1fb
Problem:    Commas in 'langmap' are not always handled correctly.
Karsten Hopp a5c1fb
Solution:   Require commas to be backslash escaped. (James Vega)
Karsten Hopp a5c1fb
Files:	    src/option.c
Karsten Hopp a5c1fb
Karsten Hopp a5c1fb
Karsten Hopp a5c1fb
*** ../vim-7.2.425/src/option.c	2010-05-13 13:12:01.000000000 +0200
Karsten Hopp a5c1fb
--- src/option.c	2010-05-14 16:04:21.000000000 +0200
Karsten Hopp a5c1fb
***************
Karsten Hopp a5c1fb
*** 10432,10437 ****
Karsten Hopp a5c1fb
--- 10432,10442 ----
Karsten Hopp a5c1fb
  	    p2 = NULL;	    /* aAbBcCdD form, p2 is NULL */
Karsten Hopp a5c1fb
  	while (p[0])
Karsten Hopp a5c1fb
  	{
Karsten Hopp a5c1fb
+ 	    if (p[0] == ',')
Karsten Hopp a5c1fb
+ 	    {
Karsten Hopp a5c1fb
+ 		++p;
Karsten Hopp a5c1fb
+ 		break;
Karsten Hopp a5c1fb
+ 	    }
Karsten Hopp a5c1fb
  	    if (p[0] == '\\' && p[1] != NUL)
Karsten Hopp a5c1fb
  		++p;
Karsten Hopp a5c1fb
  #ifdef FEAT_MBYTE
Karsten Hopp a5c1fb
***************
Karsten Hopp a5c1fb
*** 10439,10464 ****
Karsten Hopp a5c1fb
  #else
Karsten Hopp a5c1fb
  	    from = p[0];
Karsten Hopp a5c1fb
  #endif
Karsten Hopp a5c1fb
  	    if (p2 == NULL)
Karsten Hopp a5c1fb
  	    {
Karsten Hopp a5c1fb
  		mb_ptr_adv(p);
Karsten Hopp a5c1fb
! 		if (p[0] == '\\')
Karsten Hopp a5c1fb
! 		    ++p;
Karsten Hopp a5c1fb
  #ifdef FEAT_MBYTE
Karsten Hopp a5c1fb
! 		to = (*mb_ptr2char)(p);
Karsten Hopp a5c1fb
  #else
Karsten Hopp a5c1fb
! 		to = p[0];
Karsten Hopp a5c1fb
  #endif
Karsten Hopp a5c1fb
  	    }
Karsten Hopp a5c1fb
  	    else
Karsten Hopp a5c1fb
  	    {
Karsten Hopp a5c1fb
! 		if (p2[0] == '\\')
Karsten Hopp a5c1fb
! 		    ++p2;
Karsten Hopp a5c1fb
  #ifdef FEAT_MBYTE
Karsten Hopp a5c1fb
! 		to = (*mb_ptr2char)(p2);
Karsten Hopp a5c1fb
  #else
Karsten Hopp a5c1fb
! 		to = p2[0];
Karsten Hopp a5c1fb
  #endif
Karsten Hopp a5c1fb
  	    }
Karsten Hopp a5c1fb
  	    if (to == NUL)
Karsten Hopp a5c1fb
  	    {
Karsten Hopp a5c1fb
--- 10444,10476 ----
Karsten Hopp a5c1fb
  #else
Karsten Hopp a5c1fb
  	    from = p[0];
Karsten Hopp a5c1fb
  #endif
Karsten Hopp a5c1fb
+ 	    to = NUL;
Karsten Hopp a5c1fb
  	    if (p2 == NULL)
Karsten Hopp a5c1fb
  	    {
Karsten Hopp a5c1fb
  		mb_ptr_adv(p);
Karsten Hopp a5c1fb
! 		if (p[0] != ',')
Karsten Hopp a5c1fb
! 		{
Karsten Hopp a5c1fb
! 		    if (p[0] == '\\')
Karsten Hopp a5c1fb
! 			++p;
Karsten Hopp a5c1fb
  #ifdef FEAT_MBYTE
Karsten Hopp a5c1fb
! 		    to = (*mb_ptr2char)(p);
Karsten Hopp a5c1fb
  #else
Karsten Hopp a5c1fb
! 		    to = p[0];
Karsten Hopp a5c1fb
  #endif
Karsten Hopp a5c1fb
+ 		}
Karsten Hopp a5c1fb
  	    }
Karsten Hopp a5c1fb
  	    else
Karsten Hopp a5c1fb
  	    {
Karsten Hopp a5c1fb
! 		if (p2[0] != ',')
Karsten Hopp a5c1fb
! 		{
Karsten Hopp a5c1fb
! 		    if (p2[0] == '\\')
Karsten Hopp a5c1fb
! 			++p2;
Karsten Hopp a5c1fb
  #ifdef FEAT_MBYTE
Karsten Hopp a5c1fb
! 		    to = (*mb_ptr2char)(p2);
Karsten Hopp a5c1fb
  #else
Karsten Hopp a5c1fb
! 		    to = p2[0];
Karsten Hopp a5c1fb
  #endif
Karsten Hopp a5c1fb
+ 		}
Karsten Hopp a5c1fb
  	    }
Karsten Hopp a5c1fb
  	    if (to == NUL)
Karsten Hopp a5c1fb
  	    {
Karsten Hopp a5c1fb
***************
Karsten Hopp a5c1fb
*** 10476,10490 ****
Karsten Hopp a5c1fb
  
Karsten Hopp a5c1fb
  	    /* Advance to next pair */
Karsten Hopp a5c1fb
  	    mb_ptr_adv(p);
Karsten Hopp a5c1fb
! 	    if (p2 == NULL)
Karsten Hopp a5c1fb
! 	    {
Karsten Hopp a5c1fb
! 		if (p[0] == ',')
Karsten Hopp a5c1fb
! 		{
Karsten Hopp a5c1fb
! 		    ++p;
Karsten Hopp a5c1fb
! 		    break;
Karsten Hopp a5c1fb
! 		}
Karsten Hopp a5c1fb
! 	    }
Karsten Hopp a5c1fb
! 	    else
Karsten Hopp a5c1fb
  	    {
Karsten Hopp a5c1fb
  		mb_ptr_adv(p2);
Karsten Hopp a5c1fb
  		if (*p == ';')
Karsten Hopp a5c1fb
--- 10488,10494 ----
Karsten Hopp a5c1fb
  
Karsten Hopp a5c1fb
  	    /* Advance to next pair */
Karsten Hopp a5c1fb
  	    mb_ptr_adv(p);
Karsten Hopp a5c1fb
! 	    if (p2 != NULL)
Karsten Hopp a5c1fb
  	    {
Karsten Hopp a5c1fb
  		mb_ptr_adv(p2);
Karsten Hopp a5c1fb
  		if (*p == ';')
Karsten Hopp a5c1fb
*** ../vim-7.2.425/src/version.c	2010-05-14 15:42:49.000000000 +0200
Karsten Hopp a5c1fb
--- src/version.c	2010-05-14 17:32:11.000000000 +0200
Karsten Hopp a5c1fb
***************
Karsten Hopp a5c1fb
*** 683,684 ****
Karsten Hopp a5c1fb
--- 683,686 ----
Karsten Hopp a5c1fb
  {   /* Add new patch number below this line */
Karsten Hopp a5c1fb
+ /**/
Karsten Hopp a5c1fb
+     426,
Karsten Hopp a5c1fb
  /**/
Karsten Hopp a5c1fb
Karsten Hopp a5c1fb
-- 
Karsten Hopp a5c1fb
On the other hand, you have different fingers.
Karsten Hopp a5c1fb
                                      -- Steven Wright
Karsten Hopp a5c1fb
Karsten Hopp a5c1fb
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp a5c1fb
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp a5c1fb
\\\        download, build and distribute -- http://www.A-A-P.org        ///
Karsten Hopp a5c1fb
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///