[SCM] Vim packaging branch, deb/langmap-escaped-comma, updated. upstream/7.2.130-142-ge5df032

James Vega jamessan at debian.org
Sat Jul 25 21:09:31 UTC 2009


The following commit has been merged in the deb/langmap-escaped-comma branch:
commit e5df032886e27cbfb3bb532f8b5056604246e53f
Merge: f9cf686a86bef4405d59493642b1b5b902fc0c69 26b40d02f220bf4ec2d9978cced7338bc34d297c
Author: James Vega <jamessan at debian.org>
Date:   Sat Jul 25 22:19:19 2009 +0200

    Merge branch 'upstream' into deb/langmap-escaped-comma

diff --combined src/option.c
index 21328eb,a400eb6..757bb68
--- a/src/option.c
+++ b/src/option.c
@@@ -403,8 -403,9 +403,9 @@@ struct vimoptio
  #define P_NUM		0x02	/* the option is numeric */
  #define P_STRING	0x04	/* the option is a string */
  #define P_ALLOCED	0x08	/* the string option is in allocated memory,
- 				    must use vim_free() when assigning new
- 				    value. Not set if default is the same. */
+ 				   must use free_string_option() when
+ 				   assigning new value. Not set if default is
+ 				   the same. */
  #define P_EXPAND	0x10	/* environment expansion.  NOTE: P_EXPAND can
  				   never be used for local or hidden options! */
  #define P_NODEFAULT	0x40	/* don't set to default value */
@@@ -8927,6 -8928,28 +8928,28 @@@ free_termoptions(
  }
  
  /*
+  * Free the string for one term option, if it was allocated.
+  * Set the string to empty_option and clear allocated flag.
+  * "var" points to the option value.
+  */
+     void
+ free_one_termoption(var)
+     char_u *var;
+ {
+     struct vimoption   *p;
+ 
+     for (p = &options[0]; p->fullname != NULL; p++)
+ 	if (p->var == var)
+ 	{
+ 	    if (p->flags & P_ALLOCED)
+ 		free_string_option(*(char_u **)(p->var));
+ 	    *(char_u **)(p->var) = empty_option;
+ 	    p->flags &= ~P_ALLOCED;
+ 	    break;
+ 	}
+ }
+ 
+ /*
   * Set the terminal option defaults to the current value.
   * Used after setting the terminal name.
   */
@@@ -10321,7 -10344,7 +10344,7 @@@ langmap_set(
  {
      char_u  *p;
      char_u  *p2;
 -    int	    from, to;
 +    int	    from=NUL, to=NUL;
  
  #ifdef FEAT_MBYTE
      ga_clear(&langmap_mapga);		    /* clear the previous map first */
@@@ -10342,11 -10365,6 +10365,11 @@@
  	    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
@@@ -10357,29 -10375,23 +10380,29 @@@
  	    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)
  	    {

-- 
Vim packaging



More information about the pkg-vim-maintainers mailing list