# HG changeset patch # User Bram Moolenaar # Date 1643296504 -3600 # Node ID de98b9219c156c0e37d1d792b530e054b9130541 # Parent 3ea354ce9f5f52a61b9c370d9e6798335ce21a1f patch 8.2.4230: MS-Windows: set_guifontwide() is included but won't work Commit: https://github.com/vim/vim/commit/94373c48e7e438e5b924b34ce820e9b2eb9f810c Author: K.Takata Date: Thu Jan 27 15:04:22 2022 +0000 patch 8.2.4230: MS-Windows: set_guifontwide() is included but won't work Problem: MS-Windows: set_guifontwide() is included but won't work. Solution: Include set_guifontwide() only for X11. (Ken Takata, closes https://github.com/vim/vim/issues/9640) diff --git a/src/gui.c b/src/gui.c --- a/src/gui.c +++ b/src/gui.c @@ -13,7 +13,8 @@ // Structure containing all the GUI information gui_T gui; -#if !defined(FEAT_GUI_GTK) +#if defined(FEAT_GUI_X11) && !defined(FEAT_GUI_GTK) +# define USE_SET_GUIFONTWIDE static void set_guifontwide(char_u *font_name); #endif static void gui_check_pos(void); @@ -924,7 +925,7 @@ gui_init_font(char_u *font_list, int fon // longer be used! if (gui_mch_init_font(font_name, FALSE) == OK) { -#if !defined(FEAT_GUI_GTK) +#ifdef USE_SET_GUIFONTWIDE // If it's a Unicode font, try setting 'guifontwide' to a // similar double-width font. if ((p_guifontwide == NULL || *p_guifontwide == NUL) @@ -966,7 +967,7 @@ gui_init_font(char_u *font_list, int fon return ret; } -#ifndef FEAT_GUI_GTK +#ifdef USE_SET_GUIFONTWIDE /* * Try setting 'guifontwide' to a font twice as wide as "name". */ @@ -1013,7 +1014,7 @@ set_guifontwide(char_u *name) } } } -#endif // !FEAT_GUI_GTK +#endif /* * Get the font for 'guifontwide'. diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -751,6 +751,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 4230, +/**/ 4229, /**/ 4228,