Step update( FragKind kind, int x )
    {
        Step s,t;
        switch ( kind )
        {
            case exchanged: case inserted:
                s = new Step( this, kind, this.x+1 );
                if ( x-this.x>1 )
                {
                    t = new Step( s, FragKind.merged, x );
                    return t;
                }
                else
                    return s;
            case deleted:
                s = new Step( this, kind, this.x );
                if ( x>this.x )
                {
                    t = new Step( s, FragKind.merged, x );
                    return t;
                }
                else
                    return s;
            default:
                return this;
        }
    }