mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-09-02 08:53:37 +00:00
fixed: word granularity selection was not always correct
This commit is contained in:
@@ -913,13 +913,13 @@ var kDelegateRespondsTo_textShouldBeginEditing
|
||||
|
||||
if (_startTrackingLocation === CPNotFound)
|
||||
_startTrackingLocation = [_layoutManager numberOfCharacters];
|
||||
|
||||
if (fraction[0] > 0.5)
|
||||
else if (fraction[0] > 0.5)
|
||||
_startTrackingLocation++;
|
||||
|
||||
[self setSelectionGranularity:granularities[[event clickCount]]];
|
||||
|
||||
var setRange = CPMakeRange(_startTrackingLocation, 0);
|
||||
var setRange = [self selectionRangeForProposedRange:CPMakeRange(_startTrackingLocation, 0) granularity:[self selectionGranularity]];
|
||||
_startTrackingLocation = CPMaxRange(setRange)
|
||||
|
||||
if ([event modifierFlags] & CPShiftKeyMask)
|
||||
setRange = _MakeRangeFromAbs(_startTrackingLocation < _MidRange(_selectionRange) ? CPMaxRange(_selectionRange) : _selectionRange.location, _startTrackingLocation);
|
||||
|
||||
Reference in New Issue
Block a user