You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// When true, don't update on the next call to `on_dirty`. See that function for
105
-
// more info.
106
-
letignore_next_dirty=false;
105
+
// When true, this is an IDE edit; when false, it's due to a user edit.
106
+
//
107
+
// There's an inherent cycle produced by edits; this variable breaks the cycle. There are two paths through the cycle: a user edit and an IDE edit. The cycle must be broken just before it loops in both cases; this variable therefore specifies where to break the cycle. The sequence is:
108
+
//
109
+
// 1. The user performs an edit **or** `DocBlockWidget.updateDom()` is called; if `is_ide_change` is false, this function returns; otherwise, it performs an edit.
110
+
// 2. The `addEventListener("input")` for an indent or `TinyMCE.editor.on("Dirty")` callback is triggered, invoking `on_dirty()`.
111
+
// 3. An IDE edit dispatches an `add/delete/updateDocBlock` **or** in `on_dirty()`, if `is_ide_change` is true, `on_dirty()` sets it to false then returns. Otherwise, `on_dirty()` dispatches `updateDocBlock`.
112
+
// 5. This transaction invokes `docBlockField.update()`, which creates a `new DocBlockWidget()`. This loops back to step 1.
113
+
letis_ide_change=false;
107
114
// This indicates that a call to `on_dirty` is scheduled, but hasn't run yet.
108
115
leton_dirty_scheduled=false;
109
116
// True to ignore the next text selection change, since updates to the cursor or
110
117
// scroll position from the Client trigged this change.
111
118
letignore_selection_change=false;
119
+
// The compartment used to enable and disable the autosave extension.
120
+
constautosaveCompartment=newCompartment();
112
121
113
122
// Options used when creating a `Decoration`.
114
123
constdecorationOptions={
@@ -417,9 +426,9 @@ class DocBlockWidget extends WidgetType {
417
426
418
427
eq(other: DocBlockWidget){
419
428
return(
420
-
other.indent==this.indent&&
421
-
other.delimiter==this.delimiter&&
422
-
other.contents==this.contents
429
+
other.indent===this.indent&&
430
+
other.delimiter===this.delimiter&&
431
+
other.contents===this.contents
423
432
);
424
433
}
425
434
@@ -448,11 +457,8 @@ class DocBlockWidget extends WidgetType {
448
457
// "Update a DOM element created by a widget of the same type (but
449
458
// different, non-eq content) to reflect this widget."
0 commit comments