private void remove(RemoveRequest req) {
        StyledDocument doc = pane.getStyledDocument();
        AbstractDocument aDoc = (AbstractDocument) doc;
        int blob_ndx = Integer.MAX_VALUE;
        try {

            int difference = 0;

            for (int ii = 0; ii < blobs.size(); ii++) {
                if (ii > blob_ndx) {
                    blobs.get(ii).increment(-difference);
                }

                if (blobs.get(ii).getBlobIndex() == req.getBlob().getBlobIndex()) {
                    TextBlob blob = blobs.get(ii);
                    if (blob.getPrefix() != null) {
                        difference = blob.getEnd() - blob.getBegin() + 2 + blob.getPrefix().getLength();
                    } else {
                        difference = blob.getEnd() - blob.getBegin() + 2;
                    }

                    /*                    if (length() < (blob.getBegin() + difference)) {
                    System.out.println("argh");
                    } else {*/
                    int begin = blob.getBegin();
                    if (blob.getPrefix() != null) {
                        begin -= blob.getPrefix().getLength();
                    }
                    aDoc.remove(begin, difference);
//                    }

                    blob_ndx = ii;
                }
            }
        } catch (Exception ex) {
            Logger.getLogger(BlobScroller.class.getName()).log(Level.SEVERE, null, ex);
        }
        req.removeBlob();

        blobs.remove(req.getBlob());
        if (blob_ndx == Integer.MAX_VALUE) {
            highlightBlob(scroller.getCurrent(), true);
        } else {
            if (blob_ndx > 0) {
                highlightBlob(blobs.get(blob_ndx - 1), true);
            } else {
                highlightBlob(blobs.get(0), true);
            }
        }

    }