updateObservables(tx, changeReason) {
        var _a, _b, _c;
        const newModel = this.editor.getModel();
        this._textModelVersionId.set((_a = newModel === null || newModel === void 0 ? void 0 : newModel.getVersionId()) !== null && _a !== void 0 ? _a : -1, tx, changeReason);
        this._positions.set((_c = (_b = this.editor.getSelections()) === null || _b === void 0 ? void 0 : _b.map(selection => selection.getPosition())) !== null && _c !== void 0 ? _c : [new Position(1, 1)], tx);
    }
Copies over the relevant state from the text model to observables.
This solves all kind of eventing issues, as we make sure we always operate on the latest state,
regardless of who calls into us.