if(buffer.isClosed()) setBuffer(jEdit.getFirstBuffer());
	private void handleBufferUpdate(BufferUpdate msg)	{		Buffer _buffer = msg.getBuffer();		if(msg.getWhat() == BufferUpdate.CREATED)		{			if(bufferTabs != null)				bufferTabs.addBufferTab(_buffer);		}		else if(msg.getWhat() == BufferUpdate.CLOSED)		{			if(bufferTabs != null)				bufferTabs.removeBufferTab(_buffer);			if(_buffer == buffer)			{				Buffer newBuffer = (recentBuffer != null ?					recentBuffer : _buffer.getPrev());				if(newBuffer != null && !newBuffer.isClosed())					setBuffer(newBuffer);				else if(jEdit.getBufferCount() != 0)					setBuffer(jEdit.getFirstBuffer());				recentBuffer = null;			}			else if(_buffer == recentBuffer)				recentBuffer = null;		}		else if(msg.getWhat() == BufferUpdate.LOAD_STARTED)		{			textArea.getPainter().repaint();		}		else if(msg.getWhat() == BufferUpdate.DIRTY_CHANGED			|| msg.getWhat() == BufferUpdate.LOADED)		{			if(_buffer == buffer)				updateTextArea();			if(bufferTabs != null)				bufferTabs.updateBufferTab(_buffer);		}		else if(msg.getWhat() == BufferUpdate.MARKERS_CHANGED)		{			if(_buffer == buffer)				textArea.getGutter().repaint();		}		else if(msg.getWhat() == BufferUpdate.MODE_CHANGED)		{			if(_buffer == buffer)				textArea.getPainter().repaint();		}	}