-
- if(this.lastPositionLineInserted)
- this.lines.removeChild(this.lastPositionLine);
-
- if(this.parentObject.uiOptions.LASTPOS_LINE)
- this.lines.appendChild(this.lastPositionLine);
+
+ this.replaceLastPositionLine();
+ },
+ replaceLastPositionLine: function() {
+ if(this.parentObject.uiOptions.LASTPOS_LINE) {
+ if(!this.scrolledDown())
+ return;
+
+ if(!this.lastPositionLineInserted) {
+ this.scrollAdd(this.lastPositionLine);
+ } else if(this.lines.lastChild != this.lastPositionLine) {
+ try {
+ this.lines.removeChild(this.lastPositionLine);
+ } catch(e) {
+ /* IGNORE, /clear removes lastPositionLine from the dom without resetting it. */
+ }
+ this.scrollAdd(this.lastPositionLine);
+ }
+ } else {
+ if(this.lastPositionLineInserted)
+ this.lines.removeChild(this.lastPositionLine);
+ }
+
+ this.lastPositionLineInserted = this.parentObject.uiOptions.LASTPOS_LINE;
+ },
+ rename: function(name) {