mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-11 03:02:19 +00:00
use fraction again in cursorUp
This commit is contained in:
1 parent
87edda5972
commit
0e17658269
1 file changed
+5
-1
@@ -1024,8 +1024,12 @@ var kDelegateRespondsTo_textShouldBeginEditing
|
||||
if (dindex < 1)
|
||||
return;
|
||||
|
||||
var fraction = [];
|
||||
rectSource = [_layoutManager boundingRectForGlyphRange:CPMakeRange(dindex - 1, 1) inTextContainer:_textContainer];
|
||||
dindex = [_layoutManager glyphIndexForPoint:CGPointMake(_stickyXLocation, rectSource.origin.y + 1) inTextContainer:_textContainer fractionOfDistanceThroughGlyph:nil];
|
||||
dindex = [_layoutManager glyphIndexForPoint:CGPointMake(_stickyXLocation, rectSource.origin.y + 1) inTextContainer:_textContainer fractionOfDistanceThroughGlyph:fraction];
|
||||
|
||||
if (fraction[0] > 0.5)
|
||||
dindex++;
|
||||
|
||||
var oldStickyLoc = _stickyXLocation;
|
||||
[self _establishSelection:CPMakeRange(dindex,0) byExtending:NO];
|
||||
|
||||
Reference in new issue
Block a user