diff --git a/src/MacVim/English.lproj/Preferences.nib/designable.nib b/src/MacVim/English.lproj/Preferences.nib/designable.nib
index 4362f201e4..8a7b8adefa 100644
--- a/src/MacVim/English.lproj/Preferences.nib/designable.nib
+++ b/src/MacVim/English.lproj/Preferences.nib/designable.nib
@@ -1,321 +1,1719 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- This applies to files opened from the Finder (e.g. by double-clicking on a file or by dragging a file onto the MacVim dock icon) or from external programs such as Xcode.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- New windows open instantaneously with Quickstart enabled but they may not have the latest runtime files sourced. If you modify your runtime files (e.g files inside the ~/.vim directory) then you may need to disable and re-enable Quickstart to ensure that the next window you open will pick up on those changes.
-
-
-
-
-
-
-
-
-
-
-
- Selecting this option will increase rendering performance but double-tapping with three fingers to look up words will no longer work.
-
-
-
-
-
-
-
-
-
-
- Selecting this option will enable full support for displaying font ligatures. Using this with a non-proportional font may result in layout issues. Please note that liguture support currenty requires 'set cursorline' or 'set relativenumber' to draw properly.
-
-
-
-
-
-
-
-
-
-
-
-
- This option causes marked text to be rendered like normal text which is very convenient when using a complex input method (e.g. Kotoeri). However, it has some known limitations which may be circumvented by disabling this option (e.g. mapping to "dead keys" may not work). Note that without this option the Core Text renderer will not draw marked text at all.
-
-
-
-
-
-
-
-
-
-
-
- You may want to disable this option when using multiple monitors since the native full-screen support renders secondary monitors useless.
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+ 1050
+ 12A269
+ 2549
+ 1187
+ 624.00
+
+
+ NSButton
+ NSButtonCell
+ NSCustomObject
+ NSCustomView
+ NSMatrix
+ NSMenu
+ NSMenuItem
+ NSPopUpButton
+ NSPopUpButtonCell
+ NSTextField
+ NSTextFieldCell
+ NSUserDefaultsController
+
+
+ com.apple.InterfaceBuilder.CocoaPlugin
+
+
+
+
+
+
+
+
+
+
+ 268
+
+
+
+ 268
+ {{18, 50}, {388, 18}}
+
+
+
+ YES
+
+ -2080374784
+ 0
+ Prefer native full-screen support (requires Mac OS X 10.7)
+
+
+ 1211912448
+ 2
+
+
+
+
+ 200
+ 25
+
+ NO
+
+
+
+ 268
+ {{17, 20}, {415, 28}}
+
+
+
+ YES
+
+ 67108864
+ 272760832
+ You may want to disable this option when using multiple monitors since the native full-screen support renders secondary monitors useless.
+
+
+
+
+ 3
+ MC41AA
+
+
+ NO
+
+
+
+ 268
+ {{18, 146}, {174, 18}}
+
+
+
+ YES
+
+ 67108864
+ 0
+ Draw marked text inline
+
+
+ 1211912448
+ 2
+
+
+
+
+ 200
+ 25
+
+ NO
+
+
+
+ 268
+ {{17, 74}, {444, 70}}
+
+
+
+ YES
+
+ 67108864
+ 272760832
+ This option causes marked text to be rendered like normal text which is very convenient when using a complex input method (e.g. Kotoeri). However, it has some known limitations which may be circumvented by disabling this option (e.g. mapping to "dead keys" may not work). Note that without this option the Core Text renderer will not draw marked text at all.
+
+
+
+
+
+ NO
+
+
+
+ 268
+ {{18, 282}, {174, 18}}
+
+
+
+ YES
+
+ 67108864
+ 0
+ Use Core Text renderer
+
+
+ 1211912448
+ 2
+
+
+
+
+ 200
+ 25
+
+ NO
+
+
+
+ 268
+ {{17, 252}, {449, 28}}
+
+
+
+ YES
+
+ 67108864
+ 272760832
+ Selecting this option will increase rendering performance but double-tapping with three fingers to look up words will no longer work.
+
+
+
+
+
+ NO
+
+
+
+ 268
+ {{18, 228}, {133, 18}}
+
+
+
+ YES
+
+ 67108864
+ 0
+ Enable Quickstart
+
+
+ 1211912448
+ 2
+
+
+
+
+ 200
+ 25
+
+ NO
+
+
+
+ 268
+ {{17, 170}, {449, 56}}
+
+
+
+ YES
+
+ 67108864
+ 272760832
+ New windows open instantaneously with Quickstart enabled but they may not have the latest runtime files sourced. If you modify your runtime files (e.g files inside the ~/.vim directory) then you may need to disable and re-enable Quickstart to ensure that the next window you open will pick up on those changes.
+
+
+
+
+ 3
+ MC41AA
+
+ 2
+
+
+
+ NO
+
+
+ {483, 318}
+
+
+
+ NSView
+
+
+
+
+
+
+ generalPreferences
+
+
+
+ 143
+
+
+
+ openInCurrentWindowSelectionChanged:
+
+
+
+ 572
+
+
+
+ layoutPopUpButton
+
+
+
+ 596
+
+
+
+ advancedPreferences
+
+
+
+ 632
+
+
+
+ quickstartButtonClicked:
+
+
+
+ 858
+
+
+
+ atsuiButtonClicked:
+
+
+
+ 892
+
+
+
+ selectedTag: values.MMUntitledWindow
+
+
+
+
+
+ selectedTag: values.MMUntitledWindow
+ selectedTag
+ values.MMUntitledWindow
+ 2
+
+
+ 171
+
+
+
+ selectedTag: values.MMOpenInCurrentWindow
+
+
+
+
+
+ selectedTag: values.MMOpenInCurrentWindow
+ selectedTag
+ values.MMOpenInCurrentWindow
+ 2
+
+
+ 520
+
+
+
+ value: values.SUCheckAtStartup
+
+
+
+
+
+ value: values.SUCheckAtStartup
+ value
+ values.SUCheckAtStartup
+ 2
+
+
+ 169
+
+
+
+ selectedTag: values.MMOpenLayout
+
+
+
+
+
+ selectedTag: values.MMOpenLayout
+ selectedTag
+ values.MMOpenLayout
+ 2
+
+
+ 441
+
+
+
+ enabled: values.MMOpenInCurrentWindow
+
+
+
+
+
+ enabled: values.MMOpenInCurrentWindow
+ enabled
+ values.MMOpenInCurrentWindow
+
+ NSValueTransformerName
+ NSNegateBoolean
+
+ 2
+
+
+ 546
+
+
+
+ value: values.MMRenderer
+
+
+
+
+
+ value: values.MMRenderer
+ value
+ values.MMRenderer
+ 2
+
+
+ 1000
+
+
+
+ value: values.MMPreloadCacheSize
+
+
+
+
+
+ value: values.MMPreloadCacheSize
+ value
+ values.MMPreloadCacheSize
+ 2
+
+
+ 828
+
+
+
+ selectedIndex: values.MMLastWindowClosedBehavior
+
+
+
+
+
+ selectedIndex: values.MMLastWindowClosedBehavior
+ selectedIndex
+ values.MMLastWindowClosedBehavior
+ 2
+
+
+ 968
+
+
+
+ value: values.MMUseInlineIm
+
+
+
+
+
+ value: values.MMUseInlineIm
+ value
+ values.MMUseInlineIm
+ 2
+
+
+ 1016
+
+
+
+ value: values.MMNativeFullScreen
+
+
+
+
+
+ value: values.MMNativeFullScreen
+ value
+ values.MMNativeFullScreen
+ 2
+
+
+ 1031
+
+
+
+
+
+ 0
+
+
+
+
+
+ -2
+
+
+ File's Owner
+
+
+ -1
+
+
+ First Responder
+
+
+ -3
+
+
+ Application
+
+
+ 58
+
+
+ Shared Defaults
+
+
+ 115
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ General
+
+
+ 116
+
+
+
+
+
+
+
+ 117
+
+
+
+
+
+
+
+ 119
+
+
+
+
+
+
+
+
+
+
+ 137
+
+
+
+
+ 138
+
+
+
+
+ 139
+
+
+
+
+ 120
+
+
+
+
+
+
+
+
+
+ 134
+
+
+
+
+ 135
+
+
+
+
+ 121
+
+
+
+
+
+
+
+ 122
+
+
+
+
+
+
+
+ 124
+
+
+
+
+
+
+
+ 126
+
+
+
+
+
+
+
+ 427
+
+
+
+
+
+
+
+ 957
+
+
+
+
+
+
+
+ 620
+
+
+
+
+
+
+
+
+
+
+
+
+ Advanced
+
+
+ 782
+
+
+
+
+
+
+
+ 815
+
+
+
+
+
+
+
+ 817
+
+
+
+
+
+
+
+ 826
+
+
+
+
+
+
+
+ 972
+
+
+
+
+ 973
+
+
+
+
+ 974
+
+
+
+
+ 975
+
+
+
+
+ 976
+
+
+
+
+ 977
+
+
+
+
+ 978
+
+
+
+
+
+
+
+ 979
+
+
+
+
+
+
+
+ 990
+
+
+
+
+ 991
+
+
+
+
+ 992
+
+
+
+
+ 993
+
+
+
+
+ 996
+
+
+
+
+ 997
+
+
+
+
+ 429
+
+
+
+
+
+
+
+
+
+
+ 544
+
+
+
+
+ 436
+
+
+
+
+ 431
+
+
+
+
+ 430
+
+
+
+
+ 959
+
+
+
+
+
+
+
+
+
+ 962
+
+
+
+
+ 961
+
+
+
+
+ 960
+
+
+
+
+ 1001
+
+
+
+
+
+
+
+ 1004
+
+
+
+
+ 1013
+
+
+
+
+
+
+
+ 1014
+
+
+
+
+ 1017
+
+
+
+
+
+
+
+ 1020
+
+
+
+
+ 1028
+
+
+
+
+
+
+
+ 1029
+
+
+
+
+
+
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+ com.apple.InterfaceBuilder.CocoaPlugin
+
+
+
+
+
+ 1031
+
+
+
+
+ DBPrefsWindowController
+ NSWindowController
+
+ IBProjectSource
+ ./Classes/DBPrefsWindowController.h
+
+
+
+ FirstResponder
+
+ id
+ id
+ id
+
+
+
+ atsuiButtonClicked:
+ id
+
+
+ loginShellButtonClicked:
+ id
+
+
+ quickstartButtonClicked:
+ id
+
+
+
+ IBUserSource
+
+
+
+
+ MMPreferenceController
+ DBPrefsWindowController
+
+ openInCurrentWindowSelectionChanged:
+ id
+
+
+ openInCurrentWindowSelectionChanged:
+
+ openInCurrentWindowSelectionChanged:
+ id
+
+
+
+ NSView
+ NSView
+ NSPopUpButton
+
+
+
+ advancedPreferences
+ NSView
+
+
+ generalPreferences
+ NSView
+
+
+ layoutPopUpButton
+ NSPopUpButton
+
+
+
+ IBProjectSource
+ ./Classes/MMPreferenceController.h
+
+
+
+
+ 0
+ IBCocoaFramework
+
+ com.apple.InterfaceBuilder.CocoaPlugin.macosx
+
+
+ YES
+ 3
+
+ {11, 11}
+ {10, 3}
+ {15, 15}
+
+
+
diff --git a/src/MacVim/English.lproj/Preferences.nib/keyedobjects.nib b/src/MacVim/English.lproj/Preferences.nib/keyedobjects.nib
index ca8cc01ea0..993915f03e 100644
Binary files a/src/MacVim/English.lproj/Preferences.nib/keyedobjects.nib and b/src/MacVim/English.lproj/Preferences.nib/keyedobjects.nib differ
diff --git a/src/MacVim/MMAppController.m b/src/MacVim/MMAppController.m
index 9b70b55ff7..d8d374b30e 100644
--- a/src/MacVim/MMAppController.m
+++ b/src/MacVim/MMAppController.m
@@ -208,7 +208,6 @@ fsEventCallback(ConstFSEventStreamRef streamRef,
[NSNumber numberWithBool:NO], MMNoFontSubstitutionKey,
[NSNumber numberWithBool:YES], MMLoginShellKey,
[NSNumber numberWithInt:2], MMRendererKey,
- [NSNumber numberWithBool:NO], MMRendererLigaturesSupportKey,
[NSNumber numberWithInt:MMUntitledWindowAlways],
MMUntitledWindowKey,
[NSNumber numberWithBool:NO], MMTexturedWindowKey,
@@ -1227,27 +1226,6 @@ fsEventCallback(ConstFSEventStreamRef streamRef,
[self rebuildPreloadCache];
}
-- (IBAction)ligaturesButtonClicked:(id)sender
-{
- ASLogDebug(@"Toggle CoreText ligatures");
- BOOL enable = ([sender state] == NSOnState);
-
- // Update the user default MMRendererLigaturesSupport and synchronize the
- // change so that any new Vim process will pick up on the changed setting.
- CFPreferencesSetAppValue(
- (CFStringRef)MMRendererLigaturesSupportKey,
- (CFPropertyListRef)[NSNumber numberWithBool:enable],
- kCFPreferencesCurrentApplication);
- CFPreferencesAppSynchronize(kCFPreferencesCurrentApplication);
-
- ASLogInfo(@"Use ligatures=%hhd", enable);
-
- // This action is called when the user clicks the "enable support for ligatures"
- // button in the advanced preferences pane.
- [self rebuildPreloadCache];
-}
-
-
- (IBAction)loginShellButtonClicked:(id)sender
{
ASLogDebug(@"Toggle login shell option");
diff --git a/src/MacVim/MMAtsuiTextView.h b/src/MacVim/MMAtsuiTextView.h
index fd6d92768b..d4da817bab 100644
--- a/src/MacVim/MMAtsuiTextView.h
+++ b/src/MacVim/MMAtsuiTextView.h
@@ -73,6 +73,7 @@ enum { MMMaxCellsPerChar = 2 };
- (void)setPreEditRow:(int)row column:(int)col;
- (void)setMouseShape:(int)shape;
- (void)setAntialias:(BOOL)state;
+- (void)setLigatures:(BOOL)state;
- (void)setImControl:(BOOL)enable;
- (void)activateIm:(BOOL)enable;
- (void)checkImState;
diff --git a/src/MacVim/MMAtsuiTextView.m b/src/MacVim/MMAtsuiTextView.m
index f9cfd4a198..f4b568646d 100644
--- a/src/MacVim/MMAtsuiTextView.m
+++ b/src/MacVim/MMAtsuiTextView.m
@@ -361,6 +361,11 @@ defaultLineHeightForFont(NSFont *font)
antialias = state;
}
+- (void)setLigatures:(BOOL)state
+{
+ // ONLY in Core Text!
+}
+
- (void)setImControl:(BOOL)enable
{
[helper setImControl:enable];
diff --git a/src/MacVim/MMBackend.h b/src/MacVim/MMBackend.h
index d302eaabdf..d4f5063afa 100644
--- a/src/MacVim/MMBackend.h
+++ b/src/MacVim/MMBackend.h
@@ -136,6 +136,7 @@ extern NSTimeInterval MMBalloonEvalInternalDelay;
- (void)setFullScreenBackgroundColor:(int)color;
- (void)setAntialias:(BOOL)antialias;
+- (void)setLigatures:(BOOL)ligatures;
#ifdef BLUR_TRANSPARENCY
- (void)setBlurRadius:(int)radius;
diff --git a/src/MacVim/MMBackend.m b/src/MacVim/MMBackend.m
index 040054b85a..217119fb7a 100644
--- a/src/MacVim/MMBackend.m
+++ b/src/MacVim/MMBackend.m
@@ -1180,6 +1180,13 @@ extern GuiFont gui_mch_retain_font(GuiFont font);
[self queueMessage:msgid data:nil];
}
+- (void)setLigatures:(BOOL)ligatures
+{
+ int msgid = ligatures ? EnableLigaturesMsgID : DisableLigaturesMsgID;
+
+ [self queueMessage:msgid data:nil];
+}
+
#ifdef BLUR_TRANSPARENCY
- (void)setBlurRadius:(int)radius
diff --git a/src/MacVim/MMCoreTextView.h b/src/MacVim/MMCoreTextView.h
index f572caab43..d109ff0524 100644
--- a/src/MacVim/MMCoreTextView.h
+++ b/src/MacVim/MMCoreTextView.h
@@ -31,7 +31,7 @@
float fontDescent;
BOOL antialias;
- BOOL useLigatures;
+ BOOL ligatures;
NSMutableArray *drawData;
MMTextViewHelper *helper;
@@ -79,6 +79,7 @@
- (void)setPreEditRow:(int)row column:(int)col;
- (void)setMouseShape:(int)shape;
- (void)setAntialias:(BOOL)state;
+- (void)setLigatures:(BOOL)state;
- (void)setImControl:(BOOL)enable;
- (void)activateIm:(BOOL)enable;
- (void)checkImState;
diff --git a/src/MacVim/MMCoreTextView.m b/src/MacVim/MMCoreTextView.m
index 2180643a82..bd113fd28c 100644
--- a/src/MacVim/MMCoreTextView.m
+++ b/src/MacVim/MMCoreTextView.m
@@ -132,17 +132,7 @@ defaultAdvanceForFont(NSFont *font)
[self registerForDraggedTypes:[NSArray arrayWithObjects:
NSFilenamesPboardType, NSStringPboardType, nil]];
- // Check if ligatures should be used or not
- {
- Boolean val;
- Boolean keyValid;
- val = CFPreferencesGetAppBooleanValue((CFStringRef)MMRendererLigaturesSupportKey,
- kCFPreferencesCurrentApplication,
- &keyValid);
-
- useLigatures = NO;
- if(keyValid) { useLigatures = val; }
- }
+ ligatures = NO;
return self;
}
@@ -387,6 +377,11 @@ defaultAdvanceForFont(NSFont *font)
antialias = state;
}
+- (void)setLigatures:(BOOL)state
+{
+ ligatures = state;
+}
+
- (void)setImControl:(BOOL)enable
{
[helper setImControl:enable];
@@ -1371,7 +1366,7 @@ recurseDraw(const unichar *chars, CGGlyph *glyphs, CGPoint *positions,
}
CGContextSetTextPosition(context, x, y+fontDescent);
- recurseDraw(chars, glyphs, positions, length, context, fontRef, fontCache, useLigatures);
+ recurseDraw(chars, glyphs, positions, length, context, fontRef, fontCache, ligatures);
CFRelease(fontRef);
CGContextRestoreGState(context);
diff --git a/src/MacVim/MMTextView.h b/src/MacVim/MMTextView.h
index 001613b4a8..328ed0f23d 100644
--- a/src/MacVim/MMTextView.h
+++ b/src/MacVim/MMTextView.h
@@ -20,6 +20,7 @@
int insertionPointShape;
int insertionPointFraction;
BOOL antialias;
+ BOOL ligatures;
NSRect *invertRects;
int numInvertRects;
@@ -32,6 +33,7 @@
- (void)performBatchDrawWithData:(NSData *)data;
- (void)setMouseShape:(int)shape;
- (void)setAntialias:(BOOL)antialias;
+- (void)setLigatures:(BOOL)ligatures;
- (void)setImControl:(BOOL)enable;
- (void)activateIm:(BOOL)enable;
- (void)checkImState;
diff --git a/src/MacVim/MMTextView.m b/src/MacVim/MMTextView.m
index 3b9a7e4507..79caa64afb 100644
--- a/src/MacVim/MMTextView.m
+++ b/src/MacVim/MMTextView.m
@@ -307,6 +307,11 @@
antialias = state;
}
+- (void)setLigatures:(BOOL)state
+{
+ ligatures = state;
+}
+
- (void)setImControl:(BOOL)enable
{
[helper setImControl:enable];
diff --git a/src/MacVim/MMVimController.m b/src/MacVim/MMVimController.m
index dcd6fa4ff3..1ea5fd48a9 100644
--- a/src/MacVim/MMVimController.m
+++ b/src/MacVim/MMVimController.m
@@ -801,6 +801,12 @@ static BOOL isUnsafeMessage(int msgid);
[[[windowController vimView] textView] setAntialias:YES];
} else if (DisableAntialiasMsgID == msgid) {
[[[windowController vimView] textView] setAntialias:NO];
+ } else if (EnableLigaturesMsgID == msgid) {
+ [[[windowController vimView] textView] setLigatures:YES];
+ [self sendMessage:BackingPropertiesChangedMsgID data:nil];
+ } else if (DisableLigaturesMsgID == msgid) {
+ [[[windowController vimView] textView] setLigatures:NO];
+ [self sendMessage:BackingPropertiesChangedMsgID data:nil];
} else if (SetVimStateMsgID == msgid) {
NSDictionary *dict = [NSDictionary dictionaryWithData:data];
if (dict) {
diff --git a/src/MacVim/MacVim.h b/src/MacVim/MacVim.h
index 3b71ca9e7d..05ab9e2286 100644
--- a/src/MacVim/MacVim.h
+++ b/src/MacVim/MacVim.h
@@ -211,6 +211,8 @@ enum {
AddToMRUMsgID,
BackingPropertiesChangedMsgID,
SetBlurRadiusMsgID,
+ EnableLigaturesMsgID,
+ DisableLigaturesMsgID,
LastMsgID // NOTE: MUST BE LAST MESSAGE IN ENUM!
};
@@ -277,7 +279,6 @@ extern NSString *MMNoWindowKey;
extern NSString *MMAutosaveRowsKey;
extern NSString *MMAutosaveColumnsKey;
extern NSString *MMRendererKey;
-extern NSString *MMRendererLigaturesSupportKey;
enum {
MMRendererDefault = 0,
diff --git a/src/MacVim/MacVim.m b/src/MacVim/MacVim.m
index b8ce5a8948..7b96e31101 100644
--- a/src/MacVim/MacVim.m
+++ b/src/MacVim/MacVim.m
@@ -101,6 +101,8 @@ char *MessageStrings[] =
"AddToMRUMsgID",
"BackingPropertiesChangedMsgID",
"SetBlurRadiusMsgID",
+ "EnableLigaturesMsgID",
+ "DisableLigaturesMsgID",
"END OF MESSAGE IDs" // NOTE: Must be last!
};
@@ -117,7 +119,6 @@ NSString *MMNoWindowKey = @"MMNoWindow";
NSString *MMAutosaveRowsKey = @"MMAutosaveRows";
NSString *MMAutosaveColumnsKey = @"MMAutosaveColumns";
NSString *MMRendererKey = @"MMRenderer";
-NSString *MMRendererLigaturesSupportKey = @"MMRendererLigaturesSupport";
// Vim find pasteboard type (string contains Vim regex patterns)
NSString *VimFindPboardType = @"VimFindPboardType";
diff --git a/src/MacVim/gui_macvim.m b/src/MacVim/gui_macvim.m
index e3a825c7fc..36ab11002f 100644
--- a/src/MacVim/gui_macvim.m
+++ b/src/MacVim/gui_macvim.m
@@ -1783,6 +1783,11 @@ gui_macvim_set_antialias(int antialias)
[[MMBackend sharedInstance] setAntialias:antialias];
}
+ void
+gui_macvim_set_ligatures(int ligatures)
+{
+ [[MMBackend sharedInstance] setLigatures:ligatures];
+}
void
gui_macvim_wait_for_startup()
diff --git a/src/option.c b/src/option.c
index 9e2f32d99c..969852fdbb 100644
--- a/src/option.c
+++ b/src/option.c
@@ -344,6 +344,7 @@ static int p_lisp;
static int p_ml;
static int p_ma;
#ifdef FEAT_GUI_MACVIM
+static int p_macligatures;
static int p_mmta;
#endif
static int p_mod;
@@ -1828,6 +1829,11 @@ static struct vimoption
{"macatsui", NULL, P_BOOL|P_VI_DEF|P_RCLR,
(char_u *)&p_macatsui, PV_NONE,
{(char_u *)TRUE, (char_u *)0L} SCRIPTID_INIT},
+#endif
+#ifdef FEAT_GUI_MACVIM
+ {"macligatures", NULL, P_BOOL|P_VI_DEF,
+ (char_u *)&p_macligatures, PV_NONE,
+ {(char_u *)FALSE, (char_u *)0L}},
#endif
{"macmeta", "mmta", P_BOOL|P_VI_DEF,
#ifdef FEAT_GUI_MACVIM
@@ -8189,6 +8195,13 @@ set_bool_option(opt_idx, varp, value, opt_flags)
}
#endif
+#if defined(FEAT_GUI_MACVIM)
+ else if ((int *)varp == &p_macligatures)
+ {
+ gui_macvim_set_ligatures(p_macligatures);
+ }
+#endif
+
/* when 'textauto' is set or reset also change 'fileformats' */
else if ((int *)varp == &p_ta)
set_string_option_direct((char_u *)"ffs", -1,
diff --git a/src/proto/gui_macvim.pro b/src/proto/gui_macvim.pro
index fb2634b660..90d7105db6 100644
--- a/src/proto/gui_macvim.pro
+++ b/src/proto/gui_macvim.pro
@@ -207,6 +207,7 @@ void gui_mch_fuopt_update(void);
void gui_macvim_update_modified_flag();
void gui_macvim_add_to_find_pboard(char_u *pat);
void gui_macvim_set_antialias(int antialias);
+void gui_macvim_set_ligatures(int ligatures);
#ifdef BLUR_TRANSPARENCY
void gui_macvim_set_blur(int blur);