updated for version 7.0f
diff --git a/src/gui_mac.c b/src/gui_mac.c
index 4ebc121..2513224 100644
--- a/src/gui_mac.c
+++ b/src/gui_mac.c
@@ -3163,7 +3163,7 @@
DisposeEventHandlerUPP(mouseWheelHandlerUPP);
#ifdef USE_ATSUI_DRAWING
- if (gFontStyle)
+ if (p_macatsui && gFontStyle)
ATSUDisposeStyle(gFontStyle);
#endif
@@ -3321,7 +3321,7 @@
char_u used_font_name[512];
#ifdef USE_ATSUI_DRAWING
- if (gFontStyle == NULL)
+ if (p_macatsui && gFontStyle == NULL)
{
if (ATSUCreateStyle(&gFontStyle) != noErr)
gFontStyle = NULL;
@@ -3393,7 +3393,7 @@
Fixed fontSize;
ATSStyleRenderingOptions fontOptions;
- if (gFontStyle)
+ if (p_macatsui && gFontStyle)
{
fontID = font & 0xFFFF;
fontSize = Long2Fix(font >> 16);
@@ -3501,7 +3501,7 @@
Fixed fontSize;
ATSStyleRenderingOptions fontOptions;
- if (gFontStyle)
+ if (p_macatsui && gFontStyle)
{
/* Avoid setting same font again */
if (ATSUGetAttribute(gFontStyle, kATSUMaxATSUITagValue+1, sizeof font,
@@ -3546,9 +3546,9 @@
(sizeof attribTags)/sizeof(ATSUAttributeTag),
attribTags, attribSizes, attribValues) != noErr)
{
-#ifndef NDEBUG
+# ifndef NDEBUG
fprintf(stderr, "couldn't set font style\n");
-#endif
+# endif
ATSUDisposeStyle(gFontStyle);
gFontStyle = NULL;
}
@@ -3556,7 +3556,7 @@
}
- if (!gIsFontFallbackSet)
+ if (p_macatsui && !gIsFontFallbackSet)
{
/* Setup automatic font substitution. The user's guifontwide
* is tried first, then the system tries other fonts. */
@@ -3834,7 +3834,6 @@
}
}
-#ifndef USE_ATSUI_DRAWING
static void
draw_string_QD(int row, int col, char_u *s, int len, int flags)
@@ -3951,7 +3950,7 @@
#endif
}
-#else /* USE_ATSUI_DRAWING */
+#ifdef USE_ATSUI_DRAWING
static void
draw_string_ATSUI(int row, int col, char_u *s, int len, int flags)
@@ -4040,10 +4039,11 @@
gui_mch_draw_string(int row, int col, char_u *s, int len, int flags)
{
#if defined(USE_ATSUI_DRAWING)
- draw_string_ATSUI(row, col, s, len, flags);
-#else
- draw_string_QD(row, col, s, len, flags);
+ if (p_macatsui)
+ draw_string_ATSUI(row, col, s, len, flags);
+ else
#endif
+ draw_string_QD(row, col, s, len, flags);
}
/*