diff --git a/ChangeLog b/ChangeLog index 79059a507..628b9b46b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2003-01-27 16:13 Alexander Malmberg + + * Source/NSLayoutManager.m (-setHyphenationFactor:): Fix format + string. + + * Source/NSTextView.m (-mouseDown:): Handle empty text views. + (-drawRect:): Always draw glyphs' backgrounds (even when not drawing + the text view's background). + Mon Jan 27 04:01:32 2003 Nicola Pero * Source/NSScroller.m ([-mouseDown:]): When the knob slot if diff --git a/Source/NSTextView.m b/Source/NSTextView.m index a31da905c..02811ab78 100644 --- a/Source/NSTextView.m +++ b/Source/NSTextView.m @@ -100,6 +100,10 @@ with attributes to make sure this holds. How should resizing work? If the text view is set to track the used part of the text container, when does it actually update its size? Might need a new internal method called from NSLayoutManager when text has changed. +(Currently NSLayoutManager calls -sizeToFit when text has changed.) + + +Selecting with the keyboard behaves weirdly. Need to check if it's correct. */ @@ -2767,12 +2771,12 @@ Figure out how the additional layout stuff is supposed to work. [_backgroundColor set]; NSRectFill (rect); - /* Then draw the special background of the new glyphs. */ - [_layoutManager drawBackgroundForGlyphRange: drawnRange - atPoint: _textContainerOrigin]; - } + /* Then draw the special background of the new glyphs. */ + [_layoutManager drawBackgroundForGlyphRange: drawnRange + atPoint: _textContainerOrigin]; + /*printf("%@ drawRect: (%g %g)+(%g %g)\n", self,rect.origin.x,rect.origin.y, rect.size.width,rect.size.height);*/ @@ -3811,6 +3815,11 @@ other than copy/paste or dragging. */ startPoint = [self convertPoint: [theEvent locationInWindow] fromView: nil]; startIndex = [self characterIndexForPoint: startPoint]; + + if (startIndex == (unsigned int)-1) + { + return; + } if ([theEvent modifierFlags] & NSShiftKeyMask) {