diff options
Diffstat (limited to 'prev/common_darwin.m')
| -rw-r--r-- | prev/common_darwin.m | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/prev/common_darwin.m b/prev/common_darwin.m new file mode 100644 index 0000000..f56ceae --- /dev/null +++ b/prev/common_darwin.m @@ -0,0 +1,19 @@ +// 11 august 2014 + +#include "objc_darwin.h" +#include <Cocoa/Cocoa.h> + +void disableAutocorrect(id onwhat) +{ + NSTextView *tv; + + tv = (NSTextView *) onwhat; + [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]; +} |
