diff options
| author | Pietro Gagliardi <[email protected]> | 2014-08-11 00:17:21 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-08-11 00:17:21 -0400 |
| commit | 4bede4aa8d673e04ee1157ddb62721fa4e6813d9 (patch) | |
| tree | 18a51bb66b6fd4017d86d221526354b6b200464f /redo/common_darwin.m | |
| parent | 57cdc83280f01d892e7109a2c6b0032ea9c6887e (diff) | |
Split the autocorrect disabling stuff on Mac OS X into its own function and marked the TextArea TODO as a future plan.
Diffstat (limited to 'redo/common_darwin.m')
| -rw-r--r-- | redo/common_darwin.m | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/redo/common_darwin.m b/redo/common_darwin.m new file mode 100644 index 0000000..3043f21 --- /dev/null +++ b/redo/common_darwin.m @@ -0,0 +1,16 @@ +// 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]; +} |
