mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-09-03 09:23:40 +00:00
fixed: missing undo support for textcolor
This commit is contained in:
@@ -1542,6 +1542,12 @@ var kDelegateRespondsTo_textShouldBeginEditing
|
||||
|
||||
- (void)setTextColor:(CPColor)aColor range:(CPRange)range
|
||||
{
|
||||
var currentAttributes = [_textStorage attributesAtIndex:range.location effectiveRange:nil] || _typingAttributes;
|
||||
|
||||
[[[[self window] undoManager] prepareWithInvocationTarget:self]
|
||||
setTextColor:[currentAttributes objectForKey:CPForegroundColorAttributeName]
|
||||
range:CPMakeRangeCopy(range)];
|
||||
|
||||
if (!CPEmptyRange(range))
|
||||
{
|
||||
if (aColor)
|
||||
|
||||
Reference in New Issue
Block a user