aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--static/panes/editor.ts8
1 files changed, 6 insertions, 2 deletions
diff --git a/static/panes/editor.ts b/static/panes/editor.ts
index 59e17c27a..388ec1bde 100644
--- a/static/panes/editor.ts
+++ b/static/panes/editor.ts
@@ -1225,8 +1225,12 @@ export class Editor extends MonacoPane<monaco.editor.IStandaloneCodeEditor, Edit
// Only update the options if needed
if (this.settings.wordWrap) {
- this.editor.updateOptions({
- wordWrapColumn: this.editor.getLayoutInfo().viewportColumn,
+ // super.resize is going to _.defer, so we also _.defer to get those updates
+ // This fixes https://github.com/compiler-explorer/compiler-explorer/issues/4486
+ _.defer(() => {
+ this.editor.updateOptions({
+ wordWrapColumn: this.editor.getLayoutInfo().viewportColumn,
+ });
});
}
}