diff --git a/AppKit/CPTextView/CPTextView.j b/AppKit/CPTextView/CPTextView.j index 4cfccd725..7d7f13ebe 100644 --- a/AppKit/CPTextView/CPTextView.j +++ b/AppKit/CPTextView/CPTextView.j @@ -118,7 +118,7 @@ var kDelegateRespondsTo_textShouldBeginEditing BOOL _drawCaret; CPTimer _caretTimer; - CPTimer _scollingTimer; + CPTimer _scrollingTimer; CGRect _caretRect; BOOL _scrollingDownward; @@ -791,6 +791,13 @@ var kDelegateRespondsTo_textShouldBeginEditing } [self setSelectedRange:setRange affinity:0 stillSelecting:YES]; + + _scrollingTimer = [CPTimer scheduledTimerWithTimeInterval:0.1 target:self selector:@selector(_supportScrolling:) userInfo:nil repeats:YES]; // fixme: only start if we are in the scrolling areas +} + +- (void)_supportScrolling:(CPTimer)aTimer +{ + [self mouseDragged:[CPApp currentEvent]]; } - (void)_clearRange:(CPRange)range @@ -864,6 +871,11 @@ var kDelegateRespondsTo_textShouldBeginEditing var point = [_layoutManager locationForGlyphAtIndex:[self selectedRange].location]; _stickyXLocation = point.x; _startTrackingLocation = _selectionRange.location; + + if (_scrollingTimer) + { [_scrollingTimer invalidate]; + _scrollingTimer = nil; + } } - (void)moveDown:(id)sender