do not call dom functions if possible
This commit is contained in:
parent
baf69381ea
commit
6464a3852b
1 changed files with 7 additions and 8 deletions
|
|
@ -120,13 +120,12 @@ var Cursor = function(parentEl) {
|
||||||
this.cursor.style.width = config.characterWidth + "px";
|
this.cursor.style.width = config.characterWidth + "px";
|
||||||
this.cursor.style.height = config.lineHeight + "px";
|
this.cursor.style.height = config.lineHeight + "px";
|
||||||
|
|
||||||
if (this.isVisible) {
|
var overwrite = this.session.getOverwrite()
|
||||||
this.element.appendChild(this.cursor);
|
if (overwrite != this.overwrite) {
|
||||||
}
|
this.overwrite = overwrite;
|
||||||
|
if (overwrite)
|
||||||
if (this.session.getOverwrite()) {
|
|
||||||
dom.addCssClass(this.cursor, "ace_overwrite");
|
dom.addCssClass(this.cursor, "ace_overwrite");
|
||||||
} else {
|
else
|
||||||
dom.removeCssClass(this.cursor, "ace_overwrite");
|
dom.removeCssClass(this.cursor, "ace_overwrite");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue