diff --git a/Source/NSTextCheckingController.m b/Source/NSTextCheckingController.m index 079edebf8..fe2a333dc 100644 --- a/Source/NSTextCheckingController.m +++ b/Source/NSTextCheckingController.m @@ -23,6 +23,7 @@ */ #import "AppKit/NSTextCheckingController.h" +#import "AppKit/NSSpellChecker.h" @implementation NSTextCheckingController @@ -61,6 +62,13 @@ - (void) checkSpelling: (id)sender { + int wordCount = 0; + [[NSSpellChecker sharedSpellChecker] checkSpellingOfString: [_client string] + startingAt: 0 + language: nil + wrap: NO + inSpellDocumentWithTag: _spellCheckerDocumentTag + wordCount: &wordCount]; } - (void) checkTextInRange: (NSRange)range diff --git a/Source/NSTextFinder.m b/Source/NSTextFinder.m index 93ac71867..8ef01d59f 100644 --- a/Source/NSTextFinder.m +++ b/Source/NSTextFinder.m @@ -185,6 +185,13 @@ - (BOOL) validateUserInterfaceAction: (id)item { + SEL action = [item action]; + if (sel_isEqual(action, @selector(performTextFinderAction:)) || + sel_isEqual(action, @selector(performFindPanelAction:))) + { + return [self validateAction: [item tag]]; + } + return YES; }