SOURCES: 7.2.099 (NEW), 7.2.100 (NEW) - new

adamg adamg at pld-linux.org
Fri Feb 6 17:48:05 CET 2009


Author: adamg                        Date: Fri Feb  6 16:48:05 2009 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- new

---- Files affected:
SOURCES:
   7.2.099 (NONE -> 1.1)  (NEW)
SOURCES:
   7.2.100 (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/7.2.099
diff -u /dev/null SOURCES/7.2.099:1.1
--- /dev/null	Fri Feb  6 17:48:06 2009
+++ SOURCES/7.2.099	Fri Feb  6 17:48:00 2009
@@ -0,0 +1,127 @@
+To: vim-dev at vim.org
+Subject: Patch 7.2.099
+Fcc: outbox
+From: Bram Moolenaar <Bram at moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=ISO-8859-1
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.2.099
+Problem:    Changing GUI options causes an unnecessary redraw when the GUI
+	    isn't active.
+Solution:   Avoid the redraw. (Lech Lorens)
+Files:	    src/option.c
+
+
+*** ../vim-7.2.098/src/option.c	Wed Dec 24 12:53:33 2008
+--- src/option.c	Wed Feb  4 16:59:56 2009
+***************
+*** 5407,5412 ****
+--- 5407,5416 ----
+      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. */
+***************
+*** 6055,6060 ****
+--- 6059,6065 ----
+  		    errmsg = (char_u *)N_("E596: Invalid font(s)");
+  	    }
+  	}
++ 	redraw_gui_only = TRUE;
+      }
+  # ifdef FEAT_XFONTSET
+      else if (varp == &p_guifontset)
+***************
+*** 6063,6068 ****
+--- 6068,6074 ----
+  	    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,6077 ****
+--- 6078,6084 ----
+  	    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,6145 ****
+--- 6140,6163 ----
+  #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,6723 ****
+  
+      if (curwin->w_curswant != MAXCOL)
+  	curwin->w_set_curswant = TRUE;  /* in case 'showbreak' changed */
+!     check_redraw(options[opt_idx].flags);
+  
+      return errmsg;
+  }
+--- 6735,6745 ----
+  
+      if (curwin->w_curswant != MAXCOL)
+  	curwin->w_set_curswant = TRUE;  /* in case 'showbreak' changed */
+! #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;
+  }
+*** ../vim-7.2.098/src/version.c	Wed Feb  4 16:25:53 2009
+--- src/version.c	Wed Feb  4 17:24:11 2009
+***************
+*** 678,679 ****
+--- 678,681 ----
+  {   /* Add new patch number below this line */
++ /**/
++     99,
+  /**/
+
+-- 
+I started out with nothing, and I still have most of it.
+                                -- Michael Davis -- "Tonight Show"
+
+ /// Bram Moolenaar -- Bram at Moolenaar.net -- http://www.Moolenaar.net   \\\
+///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\        download, build and distribute -- http://www.A-A-P.org        ///
+ \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

================================================================
Index: SOURCES/7.2.100
diff -u /dev/null SOURCES/7.2.100:1.1
--- /dev/null	Fri Feb  6 17:48:07 2009
+++ SOURCES/7.2.100	Fri Feb  6 17:48:04 2009
@@ -0,0 +1,132 @@
+To: vim-dev at vim.org
+Subject: Patch 7.2.100
+Fcc: outbox
+From: Bram Moolenaar <Bram at moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=ISO-8859-1
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.2.100
+Problem:    When using ":source" on a FIFO or something else that can't rewind
+	    the first three bytes are skipped.
+Solution:   Instead of rewinding read the first line and detect a BOM in that.
+	    (mostly by James Vega)
+Files:	    src/ex_cmds2.c
+
+
+*** ../vim-7.2.099/src/ex_cmds2.c	Sat Nov 15 14:10:23 2008
+--- src/ex_cmds2.c	Wed Feb  4 16:05:51 2009
+***************
+*** 2842,2847 ****
+--- 2842,2848 ----
+      linenr_T		    save_sourcing_lnum;
+      char_u		    *p;
+      char_u		    *fname_exp;
++     char_u		    *firstline = NULL;
+      int			    retval = FAIL;
+  #ifdef FEAT_EVAL
+      scid_T		    save_current_SID;
+***************
+*** 2992,3014 ****
+  
+      cookie.level = ex_nesting_level;
+  #endif
+- #ifdef FEAT_MBYTE
+-     cookie.conv.vc_type = CONV_NONE;		/* no conversion */
+- 
+-     /* Try reading the first few bytes to check for a UTF-8 BOM. */
+-     {
+- 	char_u	    buf[3];
+- 
+- 	if (fread((char *)buf, sizeof(char_u), (size_t)3, cookie.fp)
+- 								  == (size_t)3
+- 		&& buf[0] == 0xef && buf[1] == 0xbb && buf[2] == 0xbf)
+- 	    /* Found BOM, setup conversion and skip over it. */
+- 	    convert_setup(&cookie.conv, (char_u *)"utf-8", p_enc);
+- 	else
+- 	    /* No BOM found, rewind. */
+- 	    fseek(cookie.fp, 0L, SEEK_SET);
+-     }
+- #endif
+  
+      /*
+       * Keep the sourcing name/lnum, for recursive calls.
+--- 2993,2998 ----
+***************
+*** 3018,3023 ****
+--- 3002,3026 ----
+      save_sourcing_lnum = sourcing_lnum;
+      sourcing_lnum = 0;
+  
++ #ifdef FEAT_MBYTE
++     cookie.conv.vc_type = CONV_NONE;		/* no conversion */
++ 
++     /* Read the first line so we can check for a UTF-8 BOM. */
++     firstline = getsourceline(0, (void *)&cookie, 0);
++     if (firstline != NULL && STRLEN(firstline) >= 3 && firstline[0] == 0xef
++ 			      && firstline[1] == 0xbb && firstline[2] == 0xbf)
++     {
++ 	/* Found BOM; setup conversion, skip over BOM and recode the line. */
++ 	convert_setup(&cookie.conv, (char_u *)"utf-8", p_enc);
++ 	p = string_convert(&cookie.conv, firstline + 3, NULL);
++ 	if (p != NULL)
++ 	{
++ 	    vim_free(firstline);
++ 	    firstline = p;
++ 	}
++     }
++ #endif
++ 
+  #ifdef STARTUPTIME
+      time_push(&tv_rel, &tv_start);
+  #endif
+***************
+*** 3111,3119 ****
+      /*
+       * Call do_cmdline, which will call getsourceline() to get the lines.
+       */
+!     do_cmdline(NULL, getsourceline, (void *)&cookie,
+  				     DOCMD_VERBOSE|DOCMD_NOWAIT|DOCMD_REPEAT);
+- 
+      retval = OK;
+  
+  #ifdef FEAT_PROFILE
+--- 3114,3121 ----
+      /*
+       * Call do_cmdline, which will call getsourceline() to get the lines.
+       */
+!     do_cmdline(firstline, getsourceline, (void *)&cookie,
+  				     DOCMD_VERBOSE|DOCMD_NOWAIT|DOCMD_REPEAT);
+      retval = OK;
+  
+  #ifdef FEAT_PROFILE
+***************
+*** 3171,3176 ****
+--- 3173,3179 ----
+  #endif
+      fclose(cookie.fp);
+      vim_free(cookie.nextline);
++     vim_free(firstline);
+  #ifdef FEAT_MBYTE
+      convert_setup(&cookie.conv, NULL, NULL);
+  #endif
+*** ../vim-7.2.099/src/version.c	Wed Feb  4 17:27:50 2009
+--- src/version.c	Wed Feb  4 17:48:47 2009
+***************
+*** 678,679 ****
+--- 678,681 ----
+  {   /* Add new patch number below this line */
++ /**/
++     100,
+  /**/
+
+-- 
+Well, you come from nothing, you go back to nothing...  What have you
+lost?  Nothing!
+				-- Monty Python: The life of Brian
+
+ /// Bram Moolenaar -- Bram at Moolenaar.net -- http://www.Moolenaar.net   \\\
+///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
+\\\        download, build and distribute -- http://www.A-A-P.org        ///
+ \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
================================================================


More information about the pld-cvs-commit mailing list