From 3854565ea461d2ed24e56c19291fa91fb3f2e2ef Mon Sep 17 00:00:00 2001 From: Bibiko Date: Thu, 17 Feb 2011 14:45:26 +0000 Subject: =?UTF-8?q?=E2=80=A2=20commented=20out=20unused=20code;=20applied?= =?UTF-8?q?=20global=20layoutManager=20and=20container=20to=20all=20method?= =?UTF-8?q?s=20-=20for=20speed?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Source/NoodleLineNumberView.m | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) (limited to 'Source') diff --git a/Source/NoodleLineNumberView.m b/Source/NoodleLineNumberView.m index a701584c..b5429ac4 100644 --- a/Source/NoodleLineNumberView.m +++ b/Source/NoodleLineNumberView.m @@ -207,8 +207,6 @@ typedef NSRange (*RangeOfLineIMP)(id object, SEL selector, NSRange range); NSUInteger line, count, rectCount, i; NSRectArray rects; NSRect visibleRect; - NSLayoutManager *layoutManager; - NSTextContainer *container; NSRange nullRange; NSArray *lines; id view; @@ -224,8 +222,6 @@ typedef NSRange (*RangeOfLineIMP)(id object, SEL selector, NSRange range); { nullRange = NSMakeRange(NSNotFound, 0); - layoutManager = [view layoutManager]; - container = [view textContainer]; count = [lines count]; // Find the characters that are currently visible @@ -288,14 +284,14 @@ typedef NSRange (*RangeOfLineIMP)(id object, SEL selector, NSRange range); bounds = [self bounds]; - if (backgroundColor != nil) - { - [backgroundColor set]; - NSRectFill(bounds); - - [[NSColor colorWithCalibratedWhite:0.58 alpha:1.0] set]; - [NSBezierPath strokeLineFromPoint:NSMakePoint(NSMaxX(bounds) - 0.5, NSMinY(bounds)) toPoint:NSMakePoint(NSMaxX(bounds) - 0.5, NSMaxY(bounds))]; - } + // if (backgroundColor != nil) + // { + // [backgroundColor set]; + // NSRectFill(bounds); + // + // [[NSColor colorWithCalibratedWhite:0.58 alpha:1.0] set]; + // [NSBezierPath strokeLineFromPoint:NSMakePoint(NSMaxX(bounds) - 0.5, NSMinY(bounds)) toPoint:NSMakePoint(NSMaxX(bounds) - 0.5, NSMaxY(bounds))]; + // } view = [self clientView]; -- cgit v1.2.3