mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-11-15 03:03:50 +00:00
Merge pull request #3180 from daboe01/cptextview-changefont-fix
fixed: crash when changing typing attributes without selection
This commit is contained in:
1 file changed
+4
@@ -1867,6 +1867,10 @@ Sets the selection to a range of characters in response to user action.
|
||||
}
|
||||
else
|
||||
{
|
||||
attributes = [_textStorage attributesAtIndex:_selectionRange.location
|
||||
longestEffectiveRange:_selectionRange
|
||||
inRange:_selectionRange];
|
||||
oldFont = [attributes objectForKey:CPFontAttributeName] || [self font];
|
||||
[_typingAttributes setObject:[sender convertFont:oldFont] forKey:CPFontAttributeName];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user