/** * Adjusts the gap to accommodate a text change that is occurring. * <p> * * @param position the position at which a change is occurring * @param sizeHint the size of the change * @param line the line where the gap will go */ void adjustGap(int position, int sizeHint, int line) { if (position == gapStart) { // text is being inserted at the gap position int size = (gapEnd - gapStart) - sizeHint; if (lowWatermark <= size && size <= highWatermark) return; } else if ((position + sizeHint == gapStart) && (sizeHint < 0)) { // text is being deleted at the gap position int size = (gapEnd - gapStart) - sizeHint; if (lowWatermark <= size && size <= highWatermark) return; } moveAndResizeGap(position, sizeHint, line); } /**
/** * Adjusts the gap to accommodate a text change that is occurring. * <p> * * @param position the position at which a change is occurring * @param sizeHint the size of the change * @param line the line where the gap will go */ void adjustGap(int position, int sizeHint, int line) { if (position == gapStart) { // text is being inserted at the gap position int size = (gapEnd - gapStart) - sizeHint; if (lowWatermark <= size && size <= highWatermark) return; } else if ((position + sizeHint == gapStart) && (sizeHint < 0)) { // text is being deleted at the gap position int size = (gapEnd - gapStart) - sizeHint; if (lowWatermark <= size && size <= highWatermark) return; } moveAndResizeGap(position, sizeHint, line); } /**
/** * Adjusts the gap to accommodate a text change that is occurring. * <p> * * @param position the position at which a change is occurring * @param sizeHint the size of the change * @param line the line where the gap will go */ void adjustGap(int position, int sizeHint, int line) { if (position == gapStart) { // text is being inserted at the gap position int size = (gapEnd - gapStart) - sizeHint; if (lowWatermark <= size && size <= highWatermark) return; } else if ((position + sizeHint == gapStart) && (sizeHint < 0)) { // text is being deleted at the gap position int size = (gapEnd - gapStart) - sizeHint; if (lowWatermark <= size && size <= highWatermark) return; } moveAndResizeGap(position, sizeHint, line); } /**
/** * Adjusts the gap to accommodate a text change that is occurring. * <p> * * @param position the position at which a change is occurring * @param sizeHint the size of the change * @param line the line where the gap will go */ void adjustGap(int position, int sizeHint, int line) { if (position == gapStart) { // text is being inserted at the gap position int size = (gapEnd - gapStart) - sizeHint; if (lowWatermark <= size && size <= highWatermark) return; } else if ((position + sizeHint == gapStart) && (sizeHint < 0)) { // text is being deleted at the gap position int size = (gapEnd - gapStart) - sizeHint; if (lowWatermark <= size && size <= highWatermark) return; } moveAndResizeGap(position, sizeHint, line); } /**
/** * Adjusts the gap to accommodate a text change that is occurring. * <p> * * @param position the position at which a change is occurring * @param sizeHint the size of the change * @param line the line where the gap will go */ void adjustGap(int position, int sizeHint, int line) { if (position == gapStart) { // text is being inserted at the gap position int size = (gapEnd - gapStart) - sizeHint; if (lowWatermark <= size && size <= highWatermark) return; } else if ((position + sizeHint == gapStart) && (sizeHint < 0)) { // text is being deleted at the gap position int size = (gapEnd - gapStart) - sizeHint; if (lowWatermark <= size && size <= highWatermark) return; } moveAndResizeGap(position, sizeHint, line); } /**