The R Project SVN R-packages

Rev

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

Rev 6263 Rev 6274
Line 310... Line 310...
310
 
310
 
311
	if(syntaxHighlightingEnabled) {
311
	if(syntaxHighlightingEnabled) {
312
		[self setTextColor:shColorNormal];
312
		[self setTextColor:shColorNormal];
313
		[self setInsertionPointColor:shColorCursor];
313
		[self setInsertionPointColor:shColorCursor];
314
	} else {
314
	} else {
315
		[self setTextColor:[NSColor blackColor]];
315
		[self setTextColor:shColorNormal];
316
		[self setInsertionPointColor:[NSColor blackColor]];
316
		[self setInsertionPointColor:shColorCursor];
317
	}
317
	}
318
#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5
318
#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5
319
	[[self layoutManager] setAllowsNonContiguousLayout:YES];
319
	[[self layoutManager] setAllowsNonContiguousLayout:YES];
320
#endif
320
#endif
321
 
321
 
Line 366... Line 366...
366
 
366
 
367
- (void)setNonSyntaxHighlighting
367
- (void)setNonSyntaxHighlighting
368
{
368
{
369
	[theTextStorage removeAttribute:NSForegroundColorAttributeName range:NSMakeRange(0, [[theTextStorage string] length])];
369
	[theTextStorage removeAttribute:NSForegroundColorAttributeName range:NSMakeRange(0, [[theTextStorage string] length])];
370
	[theTextStorage removeAttribute:NSBackgroundColorAttributeName range:NSMakeRange(0, [[theTextStorage string] length])];
370
	[theTextStorage removeAttribute:NSBackgroundColorAttributeName range:NSMakeRange(0, [[theTextStorage string] length])];
371
	[self setTextColor:[NSColor blackColor]];
371
	[self setTextColor:shColorNormal];
372
	[self setInsertionPointColor:[NSColor blackColor]];
372
	[self setInsertionPointColor:shColorCursor];
373
	[self setNeedsDisplayInRect:[self visibleRect]];
373
	[self setNeedsDisplayInRect:[self visibleRect]];
374
}
374
}
375
 
375
 
376
/**
376
/**
377
 * This method is called as part of Key Value Observing which is used to watch for prefernce changes which effect the interface.
377
 * This method is called as part of Key Value Observing which is used to watch for prefernce changes which effect the interface.
Line 611... Line 611...
611
								object:nil];
611
								object:nil];
612
 
612
 
613
		// Improve undo behaviour, i.e. it depends how fast the user types
613
		// Improve undo behaviour, i.e. it depends how fast the user types
614
		[self performSelector:@selector(breakUndoCoalescing) withObject:nil afterDelay:0.8f];
614
		[self performSelector:@selector(breakUndoCoalescing) withObject:nil afterDelay:0.8f];
615
 
615
 
-
 
616
		[NSObject cancelPreviousPerformRequestsWithTarget:(RDocumentWinCtrl*)[self delegate] 
-
 
617
								selector:@selector(functionRescan) 
-
 
618
								object:nil];
-
 
619
 
-
 
620
		// update function list to display the function in which the cursor is located
-
 
621
		[(RDocumentWinCtrl*)[self delegate] performSelector:@selector(functionRescan) withObject:nil afterDelay:0.3f];
-
 
622
 
616
	}
623
	}
617
 
624
 
618
	deleteBackward = NO;
625
	deleteBackward = NO;
619
	startListeningToBoundChanges = YES;
626
	startListeningToBoundChanges = YES;
620
 
627