diff --git a/ChangeLog b/ChangeLog index c28c02669..d91b3fc49 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2011-05-14 Eric Wasylishen + + * Source/NSTextView.m: Use IBeam cursor if selectable + 2011-05-14 Eric Wasylishen * Source/NSSplitView.m: Use resize cursors diff --git a/Source/NSTextView.m b/Source/NSTextView.m index ba7239232..386bd7116 100644 --- a/Source/NSTextView.m +++ b/Source/NSTextView.m @@ -67,6 +67,7 @@ #import "AppKit/NSColor.h" #import "AppKit/NSColorPanel.h" #import "AppKit/NSControl.h" +#import "AppKit/NSCursor.h" #import "AppKit/NSDragging.h" #import "AppKit/NSEvent.h" #import "AppKit/NSFileWrapper.h" @@ -3890,6 +3891,19 @@ Figure out how the additional layout stuff is supposed to work. } } +- (void) resetCursorRects +{ + if ([self isSelectable]) + { + const NSRect visibleRect = [self visibleRect]; + + if (!NSEqualRects(NSZeroRect, visibleRect)) + { + [self addCursorRect: visibleRect cursor: [NSCursor IBeamCursor]]; + } + } +} + - (NSString*)view: (NSView *)view stringForToolTip: (NSToolTipTag)tag point: (NSPoint)point