From 3069f38a9c0e91d13fe8a9274d1faa79107c87f4 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Fri, 10 Apr 2015 17:06:59 -0400 Subject: Removed autocorrect from Mac OS X uiEntries. Also moved uiFreeText() to text_darwin.m. --- new/util_darwin.m | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'new/util_darwin.m') 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]; } -- cgit v1.2.3