[SCM] Vim packaging branch, deb/langmap-escaped-comma, updated. upstream/7.2.079-56-gad32e5d

James Vega jamessan at debian.org
Tue Feb 17 05:29:09 UTC 2009


The following commit has been merged in the deb/langmap-escaped-comma branch:
commit ad32e5d6f62d8c5fdf4fcb8786283c7a2ee1e218
Merge: adf03b388b4c85d30baeb6838f23058d7fd03512 7c5d7772bf678d76b40b7b51f6e2e84b10f3e747
Author: James Vega <jamessan at debian.org>
Date:   Tue Feb 17 00:15:10 2009 -0500

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

diff --combined src/option.c
index 0605360,bd12b8b..74c6419
--- a/src/option.c
+++ b/src/option.c
@@@ -4119,11 -4119,23 +4119,23 @@@ do_set(arg, opt_flags
  					   && options[opt_idx].var == VAR_WIN)
  		goto skip;
  
- 	    /* Disallow changing some options from modelines */
- 	    if ((opt_flags & OPT_MODELINE) && (flags & P_SECURE))
+ 	    /* Disallow changing some options from modelines. */
+ 	    if (opt_flags & OPT_MODELINE)
  	    {
- 		errmsg = (char_u *)_("E520: Not allowed in a modeline");
- 		goto skip;
+ 		if (flags & P_SECURE)
+ 		{
+ 		    errmsg = (char_u *)_("E520: Not allowed in a modeline");
+ 		    goto skip;
+ 		}
+ #ifdef FEAT_DIFF
+ 		/* In diff mode some options are overruled.  This avoids that
+ 		 * 'foldmethod' becomes "marker" instead of "diff" and that
+ 		 * "wrap" gets set. */
+ 		if (curwin->w_p_diff
+ 			&& (options[opt_idx].indir == PV_FDM
+ 			    || options[opt_idx].indir == PV_WRAP))
+ 		    goto skip;
+ #endif
  	    }
  
  #ifdef HAVE_SANDBOX
@@@ -5268,6 -5280,21 +5280,21 @@@ insecure_flag(opt_idx, opt_flags
  }
  #endif
  
+ #ifdef FEAT_TITLE
+ static void redraw_titles __ARGS((void));
+ 
+ /*
+  * Redraw the window title and/or tab page text later.
+  */
+ static void redraw_titles()
+ {
+     need_maketitle = TRUE;
+ # ifdef FEAT_WINDOWS
+     redraw_tabline = TRUE;
+ # endif
+ }
+ #endif
+ 
  /*
   * Set a string option to a new value (without checking the effect).
   * The string is copied into allocated memory.
@@@ -5407,6 -5434,10 +5434,10 @@@ did_set_string_option(opt_idx, varp, ne
      int		did_chartab = FALSE;
      char_u	**gvarp;
      long_u	free_oldval = (options[opt_idx].flags & P_ALLOCED);
+ #ifdef FEAT_GUI
+     /* set when changing an option that only requires a redraw in the GUI */
+     int		redraw_gui_only = FALSE;
+ #endif
  
      /* Get the global option to compare with, otherwise we would have to check
       * two values for all local options. */
@@@ -5668,7 -5699,7 +5699,7 @@@
  	    {
  # ifdef FEAT_TITLE
  		/* May show a "+" in the title now. */
- 		need_maketitle = TRUE;
+ 		redraw_titles();
  # endif
  		/* Add 'fileencoding' to the swap file. */
  		ml_setflags(curbuf);
@@@ -5687,7 -5718,7 +5718,7 @@@
  	    {
  		errmsg = mb_init();
  # ifdef FEAT_TITLE
- 		need_maketitle = TRUE;
+ 		redraw_titles();
  # endif
  	    }
  	}
@@@ -5796,7 -5827,7 +5827,7 @@@
  	    else
  		curbuf->b_p_tx = FALSE;
  #ifdef FEAT_TITLE
- 	    need_maketitle = TRUE;
+ 	    redraw_titles();
  #endif
  	    /* update flag in swap file */
  	    ml_setflags(curbuf);
@@@ -6055,6 -6086,7 +6086,7 @@@
  		    errmsg = (char_u *)N_("E596: Invalid font(s)");
  	    }
  	}
+ 	redraw_gui_only = TRUE;
      }
  # ifdef FEAT_XFONTSET
      else if (varp == &p_guifontset)
@@@ -6063,6 -6095,7 +6095,7 @@@
  	    errmsg = (char_u *)N_("E597: can't select fontset");
  	else if (gui.in_use && gui_init_font(p_guifontset, TRUE) != OK)
  	    errmsg = (char_u *)N_("E598: Invalid fontset");
+ 	redraw_gui_only = TRUE;
      }
  # endif
  # ifdef FEAT_MBYTE
@@@ -6072,6 -6105,7 +6105,7 @@@
  	    errmsg = (char_u *)N_("E533: can't select wide font");
  	else if (gui_get_wide_font() == FAIL)
  	    errmsg = (char_u *)N_("E534: Invalid wide font");
+ 	redraw_gui_only = TRUE;
      }
  # endif
  #endif
@@@ -6133,13 -6167,24 +6167,24 @@@
  #ifdef FEAT_GUI
      /* 'guioptions' */
      else if (varp == &p_go)
+     {
  	gui_init_which_components(oldval);
+ 	redraw_gui_only = TRUE;
+     }
  #endif
  
  #if defined(FEAT_GUI_TABLINE)
      /* 'guitablabel' */
      else if (varp == &p_gtl)
+     {
  	redraw_tabline = TRUE;
+ 	redraw_gui_only = TRUE;
+     }
+     /* 'guitabtooltip' */
+     else if (varp == &p_gtt)
+     {
+ 	redraw_gui_only = TRUE;
+     }
  #endif
  
  #if defined(FEAT_MOUSE_TTY) && (defined(UNIX) || defined(VMS))
@@@ -6717,7 -6762,11 +6762,11 @@@
  
      if (curwin->w_curswant != MAXCOL)
  	curwin->w_set_curswant = TRUE;  /* in case 'showbreak' changed */
-     check_redraw(options[opt_idx].flags);
+ #ifdef FEAT_GUI
+     /* check redraw when it's not a GUI option or the GUI is active. */
+     if (!redraw_gui_only || gui.in_use)
+ #endif
+ 	check_redraw(options[opt_idx].flags);
  
      return errmsg;
  }
@@@ -7105,22 -7154,28 +7154,28 @@@ set_bool_option(opt_idx, varp, value, o
  	    curbuf->b_did_warn = FALSE;
  
  #ifdef FEAT_TITLE
- 	need_maketitle = TRUE;
+ 	redraw_titles();
  #endif
      }
  
  #ifdef FEAT_TITLE
      /* when 'modifiable' is changed, redraw the window title */
      else if ((int *)varp == &curbuf->b_p_ma)
- 	need_maketitle = TRUE;
+     {
+ 	redraw_titles();
+     }
      /* when 'endofline' is changed, redraw the window title */
      else if ((int *)varp == &curbuf->b_p_eol)
- 	need_maketitle = TRUE;
- #ifdef FEAT_MBYTE
-     /* when 'bomb' is changed, redraw the window title */
+     {
+ 	redraw_titles();
+     }
+ # ifdef FEAT_MBYTE
+     /* when 'bomb' is changed, redraw the window title and tab page text */
      else if ((int *)varp == &curbuf->b_p_bomb)
- 	need_maketitle = TRUE;
- #endif
+     {
+ 	redraw_titles();
+     }
+ # endif
  #endif
  
      /* when 'bin' is set also set some other options */
@@@ -7128,7 -7183,7 +7183,7 @@@
      {
  	set_options_bin(old_value, curbuf->b_p_bin, opt_flags);
  #ifdef FEAT_TITLE
- 	need_maketitle = TRUE;
+ 	redraw_titles();
  #endif
      }
  
@@@ -7279,7 -7334,7 +7334,7 @@@
  	if (!value)
  	    save_file_ff(curbuf);	/* Buffer is unchanged */
  #ifdef FEAT_TITLE
- 	need_maketitle = TRUE;
+ 	redraw_titles();
  #endif
  #ifdef FEAT_AUTOCMD
  	modified_was_set = value;
@@@ -7714,7 -7769,7 +7769,7 @@@ set_num_option(opt_idx, varp, value, er
  	newFoldLevel();
      }
  
-     /* 'foldminlevel' */
+     /* 'foldminlines' */
      else if (pp == &curwin->w_p_fml)
      {
  	foldUpdateAll(curwin);
@@@ -10128,7 -10183,7 +10183,7 @@@ langmap_set(
  {
      char_u  *p;
      char_u  *p2;
 -    int	    from, to;
 +    int	    from=NUL, to=NUL;
  
      langmap_init();			    /* back to one-to-one map first */
  
@@@ -10146,11 -10201,6 +10201,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
@@@ -10161,29 -10211,23 +10216,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