*/
    private void moveInternal(final int where) throws IOException {
        // debug ("move cursor " + where + " ("
        // + buf.cursor + " => " + (buf.cursor + where) + ")");
        buf.cursor += where;

        int i0;
        int i1;
        if (mask == null) {
            if (where < 0) {
                i1 = promptLen + wcwidth(buf.buffer, 0, buf.cursor, promptLen);
                i0 = i1 + wcwidth(buf.buffer, buf.cursor, buf.cursor - where, i1);
            } else {
                i0 = promptLen + wcwidth(buf.buffer, 0, buf.cursor - where, promptLen);
                i1 = i0 + wcwidth(buf.buffer, buf.cursor - where, buf.cursor, i0);
            }
        } else if (mask != NULL_MASK) {
            i1 = promptLen + buf.cursor;
            i0 = i1 - where;
        } else {
            return;
        }
        moveCursorFromTo(i0, i1);
    }