@Override
    public void remove(FilterBypass fb, int offset, int length)
            throws BadLocationException {
        if (!ignoreInput) {
            if (!bypassRemove) {
                if (isReceivingInput && rangeStart > 0) {
                    if (!(offset < rangeStart)) {
                        if (!isInfiniteInput()) {
                            fb.remove(offset, length);
                            fb.insertString((rangeEnd - 1), " ", inputAttr);

                            if (console.getCaretPosition() == rangeEnd)
                                console.setCaretPosition(rangeEnd - 1);
                        } else
                            fb.remove(offset, length);


                        if (!isInfiniteInput())
                            input.rangeRemove((offset - rangeStart), length);
                        else
                            input.remove((offset - rangeStart), length);
                    } else
                        Toolkit.getDefaultToolkit().beep();
                } else
                    Toolkit.getDefaultToolkit().beep();
            } else {
                bypassRemove = false;
                fb.remove(offset, length);
            }
        }
    }