The R Project SVN R-packages

Rev

Rev 6243 | Rev 6249 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6243 Rev 6246
Line 292... Line 292...
292
 
292
 
293
	NSInteger loc = foldedRanges[index][0];
293
	NSInteger loc = foldedRanges[index][0];
294
 
294
 
295
	if(loc == -1) return NSMakeRange(NSNotFound, 0);
295
	if(loc == -1) return NSMakeRange(NSNotFound, 0);
296
 
296
 
297
	return NSMakeRange(loc, foldedRanges[index][1]-foldedRanges[index][0]);
297
	return NSMakeRange(loc, foldedRanges[index][1]);
298
 
298
 
299
}
299
}
300
#pragma mark -
300
#pragma mark -
301
#pragma mark Primitives
301
#pragma mark Primitives
302
 
302
 
Line 308... Line 308...
308
- (NSDictionary *)attributesAtIndex:(NSUInteger)location effectiveRange:(NSRangePointer)range
308
- (NSDictionary *)attributesAtIndex:(NSUInteger)location effectiveRange:(NSRangePointer)range
309
{
309
{
310
 
310
 
311
	NSDictionary *attributes = (*_getImp)(_attributedString, _getSel, location, range);
311
	NSDictionary *attributes = (*_getImp)(_attributedString, _getSel, location, range);
312
 
312
 
313
	if(!foldedCounter) return attributes;
313
	if(!foldedCounter || location > [_attributedString length]) return attributes;
314
 
314
 
315
	NSRange effectiveRange;
315
	NSRange effectiveRange;
316
 
316
 
317
	// Check if location is inside folded range for drawing indicator
317
	// Check if location is inside folded range for drawing indicator
318
	NSInteger index = -1;
318
	NSInteger index = -1;
Line 338... Line 338...
338
			effectiveRange.length = 1;
338
			effectiveRange.length = 1;
339
 
339
 
340
		} else {
340
		} else {
341
			++(effectiveRange.location); --(effectiveRange.length);
341
			++(effectiveRange.location); --(effectiveRange.length);
342
		}
342
		}
-
 
343
		effectiveRange = NSIntersectionRange(effectiveRange, NSMakeRange(0, [_attributedString length]));
343
		if (range) *range = effectiveRange;
344
		if (range) *range = effectiveRange;
344
	}
345
	}
345
 
346
 
346
	return attributes;
347
	return attributes;
347
 
348