mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-12-01 10:52:03 +00:00
fixed: insertion point was wrong sometimes when dragging beyond last character
This commit is contained in:
1 parent
3d9aa24f3c
commit
baa313e8f8
1 file changed
+4
@@ -2423,6 +2423,10 @@ var CPTextViewAllowsUndoKey = @"CPTextViewAllowsUndoKey",
|
||||
- (void)_drawCaretAtLocation:(int)aLoc
|
||||
{
|
||||
var rect = [_textView._layoutManager boundingRectForGlyphRange:CPMakeRange(aLoc, 1) inTextContainer:_textView._textContainer];
|
||||
|
||||
if (aLoc >= [_textView._layoutManager numberOfCharacters])
|
||||
rect.origin.x = CGRectGetMaxX(rect)
|
||||
|
||||
[self setRect:rect];
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user