Skip to content

Commit 4326eda

Browse files
committed
Fix: remove unused is_user_change flag.
1 parent 8d4e54b commit 4326eda

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

client/src/CodeMirror-integration.mts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,6 @@ export const docBlockField = StateField.define<DecorationSet>({
190190
effect.value.indent,
191191
effect.value.delimiter,
192192
effect.value.content,
193-
false,
194193
),
195194
...decorationOptions,
196195
}).range(effect.value.from, effect.value.to),
@@ -277,9 +276,6 @@ export const docBlockField = StateField.define<DecorationSet>({
277276
prev.spec.widget.contents,
278277
effect.value.contents,
279278
),
280-
// Assume this isn't a user change unless it's
281-
// specified.
282-
effect.value.is_user_change ?? false,
283279
),
284280
...decorationOptions,
285281
}).range(from, to),
@@ -334,7 +330,6 @@ export const docBlockField = StateField.define<DecorationSet>({
334330
indent,
335331
delimiter,
336332
contents,
337-
false,
338333
),
339334
...decorationOptions,
340335
}).range(from, to),
@@ -375,9 +370,6 @@ type updateDocBlockType = {
375370
indent?: string;
376371
delimiter?: string;
377372
contents: string | StringDiff[];
378-
// True if this update comes from a user change, as opposed to an update
379-
// received from the IDE.
380-
is_user_change?: boolean;
381373
};
382374

383375
// Define an update.
@@ -420,7 +412,6 @@ class DocBlockWidget extends WidgetType {
420412
readonly indent: string,
421413
readonly delimiter: string,
422414
readonly contents: string,
423-
readonly is_user_change: boolean,
424415
) {
425416
// TODO: I don't understand why I don't need to store the provided
426417
// parameters in the object: `this.indent = indent;`, etc.
@@ -463,9 +454,6 @@ class DocBlockWidget extends WidgetType {
463454
updateDOM(dom: HTMLElement, _view: EditorView): boolean {
464455
// If this change was produced by a user edit, then the DOM was already
465456
// updated. Stop here.
466-
if (this.is_user_change) {
467-
return true;
468-
}
469457
(dom.childNodes[0] as HTMLDivElement).innerHTML = this.indent;
470458

471459
// The contents div could be a TinyMCE instance, or just a plain div.

0 commit comments

Comments
 (0)