summaryrefslogtreecommitdiff
path: root/new/util_darwin.m
diff options
context:
space:
mode:
Diffstat (limited to 'new/util_darwin.m')
-rw-r--r--new/util_darwin.m11
1 files changed, 9 insertions, 2 deletions
diff --git a/new/util_darwin.m b/new/util_darwin.m
index 8fbf391..906a0ea 100644
--- a/new/util_darwin.m
+++ b/new/util_darwin.m
@@ -7,7 +7,14 @@ void setStandardControlFont(NSControl *control)
[control setFont:[NSFont systemFontOfSize:[NSFont systemFontSizeForControlSize:NSRegularControlSize]]];
}
-void uiFreeText(char *s)
+void disableAutocorrect(NSTextView *tv)
{
- free(s);
+ [tv setEnabledTextCheckingTypes:0];
+ [tv setAutomaticDashSubstitutionEnabled:NO];
+ // don't worry about automatic data detection; it won't change stringValue (thanks pretty_function in irc.freenode.net/#macdev)
+ [tv setAutomaticSpellingCorrectionEnabled:NO];
+ [tv setAutomaticTextReplacementEnabled:NO];
+ [tv setAutomaticQuoteSubstitutionEnabled:NO];
+ [tv setAutomaticLinkDetectionEnabled:NO];
+ [tv setSmartInsertDeleteEnabled:NO];
}