Skip to content

Commit

Permalink
Turn on back fragments
Browse files Browse the repository at this point in the history
  • Loading branch information
Yury Korolev committed Feb 6, 2018
1 parent 70baabb commit 289c793
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions Resources/hterm_all.patches.js
Original file line number Diff line number Diff line change
Expand Up @@ -409,19 +409,19 @@ hterm.Screen.prototype.overwriteString = function(str, wcwidth = undefined) {
}

// Blink: make operations on detached node
// var parentNode = this.cursorRowNode_.parentNode;
// var nextSibling = this.cursorRowNode_.nextSibling;
// var fragment = document.createDocumentFragment();
// fragment.appendChild(this.cursorRowNode_);
var prevSibling = this.cursorRowNode_.previousSibling;
var nextSibling = this.cursorRowNode_.nextSibling;
var fragment = document.createDocumentFragment();
fragment.appendChild(this.cursorRowNode_);

this.deleteChars(Math.min(wcwidth, maxLength));
this.insertString(str, wcwidth);

// if (nextSibling) {
// parentNode.insertBefore(fragment, nextSibling);
// } else {
// parentNode.appendChild(fragment);
// }
if (nextSibling) {
nextSibling.parentNode.insertBefore(fragment, nextSibling);
} else if (prevSibling) {
prevSibling.parentNode.appendChild(fragment);
}
};


Expand Down

0 comments on commit 289c793

Please sign in to comment.