Fix view zones after toggling opt-remark filters (#8115)

Resolves #8109.

Using `.bind` creates a function that forwards all arguments, which
means that the old `filters` state was passed as the `width` parameter
to `showOptRemarks`, but `undefined` was expected.
This commit is contained in:
narpfel
2025-09-20 20:49:00 +02:00
committed by GitHub
parent 902d3c9a5c
commit 80603ee697

View File

@@ -77,7 +77,7 @@ export class Opt extends MonacoPane<monaco.editor.IStandaloneCodeEditor, OptStat
override registerButtons(state: OptState) {
super.registerButtons(state);
this.filters = new Toggles(this.domRoot.find('.filters'), state as unknown as Record<string, boolean>);
this.filters.on('change', this.showOptRemarks.bind(this));
this.filters.on('change', () => this.showOptRemarks());
this.toggleWrapButton = new Toggles(this.domRoot.find('.options'), state as unknown as Record<string, boolean>);
this.toggleWrapButton.on('change', this.onToggleWrapChange.bind(this));