Skip to content

Commit

Permalink
fix: Move session.onChange and placeholder.onChange handlers to be fi…
Browse files Browse the repository at this point in the history
…rst in the change event handler queue
  • Loading branch information
andrewnester committed Jun 29, 2022
1 parent 59af84f commit bcb51f2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/ace/edit_session.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ EditSession.$uid = 0;
this.doc.off("change", this.$onChange);

this.doc = doc;
doc.on("change", this.$onChange);
doc.on("change", this.$onChange, true);

this.bgTokenizer.setDocument(this.getDocument());

Expand Down
2 changes: 1 addition & 1 deletion lib/ace/placeholder.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ var PlaceHolder = function(session, length, pos, others, mainClass, othersClass)
this.mainClass = mainClass;
this.othersClass = othersClass;
this.$onUpdate = this.onUpdate.bind(this);
this.doc.on("change", this.$onUpdate);
this.doc.on("change", this.$onUpdate, true);
this.$others = others;

this.$onCursorChange = function() {
Expand Down

0 comments on commit bcb51f2

Please sign in to comment.