if (gapStart == 0) resetMarksAtZero();
  protected void shiftGap(int newGapStart)  {    if (newGapStart == gapStart)      return;    int newGapEnd = newGapStart + gapEnd - gapStart;    if (newGapStart < gapStart)      {        // Update the positions between newGapStart and (old) gapStart. The marks        // must be shifted by (gapEnd - gapStart).        Vector v = getPositionsInRange(null, newGapStart + 1,                                       gapStart - newGapStart + 1);        for (Iterator i = v.iterator(); i.hasNext();)          {            GapContentPosition p = (GapContentPosition) i.next();            p.mark += gapEnd - gapStart;          }        System.arraycopy(buffer, newGapStart, buffer, newGapEnd, gapStart                         - newGapStart);        gapStart = newGapStart;        gapEnd = newGapEnd;      }    else      {        // Update the positions between newGapEnd and (old) gapEnd. The marks        // must be shifted by (gapEnd - gapStart).        Vector v = getPositionsInRange(null, gapEnd,                                       newGapEnd - gapEnd);        for (Iterator i = v.iterator(); i.hasNext();)          {            GapContentPosition p = (GapContentPosition) i.next();            p.mark -= gapEnd - gapStart;          }        System.arraycopy(buffer, gapEnd, buffer, gapStart, newGapStart                         - gapStart);        gapStart = newGapStart;        gapEnd = newGapEnd;      }  }