mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-08-25 04:57:03 +00:00
Merge pull request #2960 from mrcarlberg/cptextview_exposedrect
Fixed: Prevent crash in CPTextView when _exposedRect is nil
This commit is contained in:
@@ -1124,7 +1124,7 @@ Sets the selection to a range of characters in response to user action.
|
||||
// dragging the selection
|
||||
if ([self selectionGranularity] == CPSelectByCharacter && CPLocationInRange(_startTrackingLocation, _selectionRange))
|
||||
{
|
||||
var visibleRange = [_layoutManager glyphRangeForBoundingRect:_exposedRect inTextContainer:_textContainer],
|
||||
var visibleRange = [_layoutManager glyphRangeForBoundingRect:[self exposedRect] inTextContainer:_textContainer],
|
||||
firstFragment = [_layoutManager _firstLineFragmentForLineFromLocation:_selectionRange.location],
|
||||
lastFragment = [_layoutManager _lastLineFragmentForLineFromLocation:CPMaxRange(_selectionRange)],
|
||||
lineBeginningIndex = firstFragment._range.location,
|
||||
|
||||
Reference in New Issue
Block a user