TokenMarker tokenMarker = textArea.getTokenMarker();
	public void paint(Graphics gfx)	{		updateTabSize();		Rectangle clipRect = gfx.getClipBounds();		gfx.setColor(getBackground());		gfx.fillRect(clipRect.x,clipRect.y,clipRect.width,clipRect.height);		int x = textArea.getHorizontalOffset();		// We don't use yToLine() here because that method doesn't		// return lines past the end of the buffer		int height = fm.getHeight();		int firstLine = textArea.getFirstLine();		int firstInvalid = firstLine + clipRect.y / height;		// Because the clipRect's height is usually an even multiple		// of the font height, we subtract 1 from it, otherwise one		// too many lines will always be painted.		int lastInvalid = firstLine + (clipRect.y + clipRect.height - 1) / height;		int lineCount = textArea.getLineCount();		try		{			TokenMarker tokenMarker = textArea.getTokenMarker();			int maxWidth = textArea.maxHorizontalScrollWidth;			boolean updateMaxHorizontalScrollWidth = false;			for(int line = firstInvalid; line <= lastInvalid; line++)			{				boolean valid = textArea.getBuffer().isLoaded()					&& line >= 0 && line < lineCount;				int width = paintLine(gfx,tokenMarker,valid,line,x)					- x + 5 /* Yay */;				if(valid)				{					tokenMarker.setLineWidth(line,width);					if(width > maxWidth)						updateMaxHorizontalScrollWidth = true;				}			}			if(tokenMarker.isNextLineRequested())			{				int h = clipRect.y + clipRect.height;				repaint(0,h,getWidth(),getHeight() - h);			}			if(updateMaxHorizontalScrollWidth)				textArea.updateMaxHorizontalScrollWidth();		}		catch(Exception e)		{			Log.log(Log.ERROR,this,"Error repainting line"				+ " range {" + firstInvalid + ","				+ lastInvalid + "}:");			Log.log(Log.ERROR,this,e);		}	}