Commits

Ken Takata committed fc5957c

update for 7.3.782

patch-efficient_gfw.diff is merged as 7.3.781.
patch-use_gfw_for_ime.diff is merged as 7.3.782.

Comments (0)

Files changed (3)

patch-efficient_gfw.diff

-# HG changeset patch
-# Parent d8378fea5bf26ec6e1589abea8d00418e9379ca7
-
-diff -r d8378fea5bf2 src/gui.c
---- a/src/gui.c	Fri Jan 18 09:23:00 2013 +0900
-+++ b/src/gui.c	Sun Jan 20 11:58:56 2013 +0900
-@@ -2383,7 +2383,9 @@
- 	int	cl;		/* byte length of current char */
- 	int	comping;	/* current char is composing */
- 	int	scol = col;	/* screen column */
--	int	dowide;		/* use 'guifontwide' */
-+	int	curr_wide;	/* use 'guifontwide' */
-+	int	prev_wide = FALSE;
-+	int	wide_changed;
- 
- 	/* Break the string at a composing character, it has to be drawn on
- 	 * top of the previous character. */
-@@ -2398,9 +2400,9 @@
- 		    && fontset == NOFONTSET
- #  endif
- 		    && gui.wide_font != NOFONT)
--		dowide = TRUE;
-+		curr_wide = TRUE;
- 	    else
--		dowide = FALSE;
-+		curr_wide = FALSE;
- 	    comping = utf_iscomposing(c);
- 	    if (!comping)	/* count cells from non-composing chars */
- 		cells += cn;
-@@ -2408,9 +2410,11 @@
- 	    if (cl == 0)	/* hit end of string */
- 		len = i + cl;	/* len must be wrong "cannot happen" */
- 
-+	    wide_changed = curr_wide != prev_wide;
-+
- 	    /* print the string so far if it's the last character or there is
- 	     * a composing character. */
--	    if (i + cl >= len || (comping && i > start) || dowide
-+	    if (i + cl >= len || (comping && i > start) || wide_changed
- #  if defined(FEAT_GUI_X11)
- 		    || (cn > 1
- #   ifdef FEAT_XFONTSET
-@@ -2422,25 +2426,28 @@
- #  endif
- 	       )
- 	    {
--		if (comping || dowide)
-+		if (comping || wide_changed)
- 		    thislen = i - start;
- 		else
- 		    thislen = i - start + cl;
- 		if (thislen > 0)
- 		{
-+		    if (prev_wide)
-+			gui_mch_set_font(gui.wide_font);
- 		    gui_mch_draw_string(gui.row, scol, s + start, thislen,
- 								  draw_flags);
-+		    if (prev_wide)
-+			gui_mch_set_font(font);
- 		    start += thislen;
- 		}
- 		scol += cells;
- 		cells = 0;
--		if (dowide)
-+		/* adjust to not draw a character which width is changed
-+		 * against with last one. */
-+		if (wide_changed && !comping)
- 		{
--		    gui_mch_set_font(gui.wide_font);
--		    gui_mch_draw_string(gui.row, scol - cn,
--						   s + start, cl, draw_flags);
--		    gui_mch_set_font(font);
--		    start += cl;
-+		    scol -= cn;
-+		    cl = 0;
- 		}
- 
- #  if defined(FEAT_GUI_X11)
-@@ -2450,7 +2457,7 @@
- #   ifdef FEAT_XFONTSET
- 			&& fontset == NOFONTSET
- #   endif
--			&& !dowide)
-+			&& !wide_changed)
- 		    gui_mch_draw_string(gui.row, scol - 1, (char_u *)" ",
- 							       1, draw_flags);
- #  endif
-@@ -2468,6 +2475,7 @@
- #  endif
- 		start = i + cl;
- 	    }
-+	    prev_wide = curr_wide;
- 	}
- 	/* The stuff below assumes "len" is the length in screen columns. */
- 	len = scol - col;

patch-use_gfw_for_ime.diff

-# HG changeset patch
-# Parent 90260c4de57396c83532cf99babecbc8f7473c16
-use guifontwide for IME when available
-
-diff -r 90260c4de573 runtime/doc/options.txt
---- a/runtime/doc/options.txt	Wed Sep 26 21:55:52 2012 +0900
-+++ b/runtime/doc/options.txt	Tue Oct 02 10:30:19 2012 +0900
-@@ -3567,6 +3567,10 @@
- 	to set 'guifontwide' at all unless you want to override the choice
- 	made by Pango/Xft.
- 
-+	Windows +multibyte only:		*guifontwide_win_mbyte*
-+
-+	If set and vaild, 'guifontwide' is used for IME instead of 'guifont'.
-+
- 						*'guiheadroom'* *'ghr'*
- 'guiheadroom' 'ghr'	number	(default 50)
- 			global
-diff -r 90260c4de573 src/gui.c
---- a/src/gui.c	Wed Sep 26 21:55:52 2012 +0900
-+++ b/src/gui.c	Tue Oct 02 10:30:19 2012 +0900
-@@ -1008,6 +1008,9 @@
-     else
- #endif
- 	gui.wide_font = font;
-+#ifdef FEAT_GUI_MSWIN
-+    gui_mch_wide_font_changed();
-+#endif
-     return OK;
- }
- #endif
-diff -r 90260c4de573 src/gui_w48.c
---- a/src/gui_w48.c	Wed Sep 26 21:55:52 2012 +0900
-+++ b/src/gui_w48.c	Tue Oct 02 10:30:19 2012 +0900
-@@ -318,10 +318,15 @@
- 
- /*
-  * For control IME.
-+ *
-+ * These LOGFONT used for IME.
-  */
- #ifdef FEAT_MBYTE
- # ifdef USE_IM_CONTROL
-+/* holds LOGFONT for 'guifontwide' if available, otherwise 'guifont' */
- static LOGFONT norm_logfont;
-+/* holds LOGFONT for 'guifont' always. */
-+static LOGFONT sub_logfont;
- # endif
- #endif
- 
-@@ -3078,6 +3083,39 @@
-     return res;
- }
- 
-+
-+#ifdef FEAT_MBYTE_IME 
-+/*
-+ * Set correct LOGFONT to IME.  Use 'guifontwide' if available, otherwise use
-+ * 'guifont'
-+ */
-+    static void
-+update_im_font()
-+{
-+    LOGFONT	lf_wide;
-+
-+    if (p_guifontwide != NULL && *p_guifontwide != NUL
-+	    && get_logfont(&lf_wide, p_guifontwide, NULL, TRUE) == OK)
-+	norm_logfont = lf_wide;
-+    else
-+	norm_logfont = sub_logfont;
-+    im_set_font(&norm_logfont);
-+}
-+#endif
-+
-+#ifdef FEAT_MBYTE
-+/*
-+ * Handler of gui.wide_font (p_guifontwide) changed notification.
-+ */
-+    void
-+gui_mch_wide_font_changed()
-+{
-+#ifdef FEAT_MBYTE_IME
-+    update_im_font();
-+#endif
-+}
-+#endif
-+
- /*
-  * Initialise vim to use the font with the given name.
-  * Return FAIL if the font could not be loaded, OK otherwise.
-@@ -3100,9 +3138,10 @@
- 	font_name = lf.lfFaceName;
- #if defined(FEAT_MBYTE_IME) || defined(GLOBAL_IME)
-     norm_logfont = lf;
-+    sub_logfont = lf;
- #endif
- #ifdef FEAT_MBYTE_IME
--    im_set_font(&lf);
-+    update_im_font();
- #endif
-     gui_mch_free_font(gui.norm_font);
-     gui.norm_font = font;
-diff -r 90260c4de573 src/proto/gui_w16.pro
---- a/src/proto/gui_w16.pro	Wed Sep 26 21:55:52 2012 +0900
-+++ b/src/proto/gui_w16.pro	Tue Oct 02 10:30:19 2012 +0900
-@@ -50,6 +50,7 @@
- void gui_mch_insert_lines __ARGS((int row, int num_lines));
- void gui_mch_exit __ARGS((int rc));
- int gui_mch_init_font __ARGS((char_u *font_name, int fontset));
-+void gui_mch_wide_font_changed __ARGS((void));
- int gui_mch_maximized __ARGS((void));
- void gui_mch_newfont __ARGS((void));
- void gui_mch_settitle __ARGS((char_u *title, char_u *icon));
-diff -r 90260c4de573 src/proto/gui_w32.pro
---- a/src/proto/gui_w32.pro	Wed Sep 26 21:55:52 2012 +0900
-+++ b/src/proto/gui_w32.pro	Tue Oct 02 10:30:19 2012 +0900
-@@ -50,6 +50,7 @@
- void gui_mch_insert_lines __ARGS((int row, int num_lines));
- void gui_mch_exit __ARGS((int rc));
- int gui_mch_init_font __ARGS((char_u *font_name, int fontset));
-+void gui_mch_wide_font_changed __ARGS((void));
- int gui_mch_maximized __ARGS((void));
- void gui_mch_newfont __ARGS((void));
- void gui_mch_settitle __ARGS((char_u *title, char_u *icon));
 0009-kaoriya-ambiwidth-auto.patch
 0025-kaoriya-feat-kaoriya.patch
 support-alt-gettext-dll.patch
-patch-use_gfw_for_ime.diff
 version_acl_xpm.patch
 0001-support-mingw-w64.patch
 0002-set-RUBY_INSTALL_NAME-and-RUBY_PLATFORM.patch
 0003-use-mingw-gcc-as-default.patch
 do_modelines-after-reload.patch
-patch-efficient_gfw.diff
 patch-direct_write.diff