if(view.getBuffer() == buffer) { view.getTextArea().select(start,end); } else { buffer.setCaretInfo(start,end); view.setBuffer(buffer); }
view.setBuffer(buffer); view.getTextArea().select(start,end);
		public void valueChanged(ListSelectionEvent evt)		{			if(results.isSelectionEmpty() || evt.getValueIsAdjusting())				return;			SearchResult result = (SearchResult)results.getSelectedValue();			Buffer buffer = result.buffer;			int start = result.start.getOffset();			int end = result.end.getOffset();			if(view.getBuffer() == buffer)			{				view.getTextArea().select(start,end);			}			else			{				buffer.setCaretInfo(start,end);				view.setBuffer(buffer);			}		}