try { updating = true; removeBufferTab(buffer); addBufferTab(buffer); selectBufferTab(buffer); } finally { updating = false; }
updating = true;  removeBufferTab(buffer); addBufferTab(buffer); selectBufferTab(buffer);  updating = false;
	public void updateBufferTab(Buffer buffer)	{		// if dirty is now true, we just update the tab's label,		// otherwise, the name might have changed (dirty = false		// means just saved)		if(buffer.isDirty())		{			int index = buffer.getIndex();			setTitleAt(index,getTabLabel(buffer));		}		else		{			try			{				updating = true;				removeBufferTab(buffer);				addBufferTab(buffer);				selectBufferTab(buffer);			}			finally			{				updating = false;			}			if(view.getBuffer() == buffer)				selectBufferTab(buffer);		}	}