System.err.println(i + ": " + s);
		public void removeUpdate(DocumentEvent evt)		{			if(!buffer.isLoaded())				return;			documentChanged(evt);			int offset = evt.getOffset();			int length = evt.getLength();			int end = offset + length;			boolean caretEvent = false;			// loop through all selections, resizing them if			// necessary			for(int i = 0; i < selection.size(); i++)			{				Selection s = (Selection)selection.elementAt(i);				boolean changed = false;				if(s.start > offset && s.start <= end)				{					s.start = offset;					changed = caretEvent = true;				}				else if(s.start > end)				{					s.start -= length;					changed = caretEvent = true;				}				if(s.end > offset && s.end <= end)				{					s.end = offset;					changed = caretEvent = true;				}				else if(s.end > end)				{					s.end -= length;					changed = caretEvent = true;				}				if(s.start == s.end)				{					selection.removeElement(s);					invalidateLineRange(s.startLine,s.endLine);					i--;				}				else if(changed)				{					s.startLine = getLineOfOffset(s.start);					s.endLine = getLineOfOffset(s.end);					invalidateLineRange(s.startLine,s.endLine);					System.err.println(i + ": " + s);				}			}			if(caret > offset && caret <= end)				moveCaretPosition(offset,false);			else if(caret > end)				moveCaretPosition(caret - length,false);			else			{				updateBracketHighlight();				if(caretEvent)					fireCaretEvent();			}		}