if(bufferSwitcher != null) bufferSwitcher.repaint();
if(view.getEditPane() == this) view.getStatus().updateMode();
	private void handleBufferUpdate(BufferUpdate msg)	{		Buffer _buffer = msg.getBuffer();		if(msg.getWhat() == BufferUpdate.CREATED)		{			if(bufferSwitcher != null)				bufferSwitcher.updateBufferList();			/* When closing the last buffer, the BufferUpdate.CLOSED			 * handler doesn't call setBuffer(), because null buffers			 * are not supported. Instead, it waits for the subsequent			 * 'Untitled' file creation. */			if(buffer.isClosed())				setBuffer(jEdit.getFirstBuffer());		}		else if(msg.getWhat() == BufferUpdate.CLOSED)		{			if(bufferSwitcher != null)				bufferSwitcher.updateBufferList();			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)		{			if(_buffer == buffer)			{				textArea.setCaretPosition(0);				textArea.getPainter().repaint();			}		}		else if(msg.getWhat() == BufferUpdate.DIRTY_CHANGED)		{			if(_buffer == buffer)			{				if(bufferSwitcher != null)				{					if(buffer.isDirty())						bufferSwitcher.repaint();					else						bufferSwitcher.updateBufferList();				}			}		}		else if(msg.getWhat() == BufferUpdate.LOADED)		{			if(_buffer == buffer)			{				textArea.repaint();				textArea.updateScrollBars();				if(bufferSwitcher != null)					bufferSwitcher.updateBufferList();			}		}		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();				if(bufferSwitcher != null)					bufferSwitcher.repaint();			}		}	}