mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 03:11:18 +00:00
tweaks to last commit
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@32562 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
2d713e6cca
commit
5d165e7db8
2 changed files with 16 additions and 3 deletions
|
@ -1,3 +1,7 @@
|
|||
2011-03-13 Eric Wasylishen <ewasylishen@gmail.com>
|
||||
|
||||
* Source/NSTextView.m: Tweaks to last commit
|
||||
|
||||
2011-03-13 Eric Wasylishen <ewasylishen@gmail.com>
|
||||
|
||||
* Source/NSLayoutManager.m: Clear temporary attributes
|
||||
|
|
|
@ -5506,8 +5506,15 @@ static const NSInteger GSSpellingSuggestionMenuItemTag = 1;
|
|||
- (void) _acceptGuess: (id)sender
|
||||
{
|
||||
NSString *guess = [(NSMenuItem*)sender title];
|
||||
[[self textStorage] replaceCharactersInRange: [self selectedRange]
|
||||
withString: guess];
|
||||
NSRange range = [self selectedRange];
|
||||
|
||||
if (![self shouldChangeTextInRange: range replacementString: guess])
|
||||
return;
|
||||
|
||||
[_textStorage beginEditing];
|
||||
[self replaceCharactersInRange: range withString: guess];
|
||||
[_textStorage endEditing];
|
||||
[self didChangeText];
|
||||
}
|
||||
|
||||
- (void) rightMouseDown: (NSEvent *)theEvent
|
||||
|
@ -5546,7 +5553,9 @@ static const NSInteger GSSpellingSuggestionMenuItemTag = 1;
|
|||
|
||||
if (NSEqualRanges([self selectedRange],
|
||||
[self selectionRangeForProposedRange: NSMakeRange([self selectedRange].location, 0)
|
||||
granularity: NSSelectByWord]))
|
||||
granularity: NSSelectByWord])
|
||||
&& [self selectedRange].length > 0
|
||||
&& [self isEditable])
|
||||
{
|
||||
// Possibly show spelling suggestions
|
||||
|
||||
|
|
Loading…
Reference in a new issue