The R Project SVN R-packages

Rev

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

Rev 6249 Rev 6260
Line 748... Line 748...
748
		isSyntaxHighlighting = NO;
748
		isSyntaxHighlighting = NO;
749
		breakSyntaxHighlighting = 0;
749
		breakSyntaxHighlighting = 0;
750
		return;
750
		return;
751
	}
751
	}
752
 
752
 
753
	NSInteger breakCounter = 1000;
-
 
754
	NSInteger start = visibleRange.location - R_SYNTAX_HILITE_BIAS;
753
	NSInteger start = visibleRange.location - R_SYNTAX_HILITE_BIAS;
755
	if (start > 0)
754
	if (start > 0)
756
		while(start > 0) {
755
		while(start > 0) {
757
			if(!breakCounter--) break;
-
 
758
			if(CFStringGetCharacterAtIndex((CFStringRef)selfstr, start)=='\n')
756
			if(CFStringGetCharacterAtIndex((CFStringRef)selfstr, start)=='\n')
759
				break;
757
				break;
760
			start--;
758
			start--;
761
		}
759
		}
762
	if(start < 0) start = 0;
760
	if(start < 0) start = 0;
763
	breakCounter = 1000;
-
 
764
	NSInteger end = NSMaxRange(visibleRange) + R_SYNTAX_HILITE_BIAS;
761
	NSInteger end = NSMaxRange(visibleRange) + R_SYNTAX_HILITE_BIAS;
765
	if (end > strlength) {
762
	if (end > strlength) {
766
		end = strlength;
763
		end = strlength;
767
	} else {
764
	} else {
768
		while(end < strlength) {
765
		while(end < strlength) {
769
			if(!breakCounter--) break;
-
 
770
			if(CFStringGetCharacterAtIndex((CFStringRef)selfstr, end)=='\n')
766
			if(CFStringGetCharacterAtIndex((CFStringRef)selfstr, end)=='\n')
771
				break;
767
				break;
772
			end++;
768
			end++;
773
		}
769
		}
774
	}
770
	}