Cursor blink rate update

Hello,

I’m using a Compartment to handle dynamically extension. It works as advertise except with cursorBlinkRate. If I change the rate, the extension is not updated (the initial value is kept - except if I use a value of 1200 that remove the extension in my case).
Looking at the code I saw that function:

That makes me wonder how it could ever be true as the two statements are identical.

Is it a bug?


The code I’m using is

  class ConfigurableBuilder<T> implements IConfigurableExtensionBuilder<T> {
    constructor(builder: (value: T) => Extension) {
      this._compartment = new Compartment();
      this._builder = builder;
    }

    instance(value: T): Extension {
      return this._compartment.of(this._builder(value));
    }

    reconfigure(value: T): StateEffect<unknown> {
      return this._compartment.reconfigure(this._builder(value));
    }

    private _compartment: Compartment;
    private _builder: (value: T) => Extension;
  }

  const config = new ConfigurableBuilder((value: number) =>
          value !== 1200 ? drawSelection({ cursorBlinkRate: value }) : [])

That was caused by a bug in drawSelection. This patch fixes it.

1 Like

:rocket: Thanks a lot for the quick fix