a bit simplification of cursot info implementation
This commit is contained in:
parent
91f763b9b9
commit
1dde8b2ac9
|
@ -393,7 +393,7 @@ textmode._updateCursorInfoDisplay = function () {
|
||||||
if (selectionRange.start !== selectionRange.end) {
|
if (selectionRange.start !== selectionRange.end) {
|
||||||
count = selectionRange.end - selectionRange.start;
|
count = selectionRange.end - selectionRange.start;
|
||||||
}
|
}
|
||||||
updateDisplay.apply(me);
|
updateDisplay();
|
||||||
},0);
|
},0);
|
||||||
|
|
||||||
} else if (this.aceEditor && this.curserInfoElements) {
|
} else if (this.aceEditor && this.curserInfoElements) {
|
||||||
|
@ -403,18 +403,18 @@ textmode._updateCursorInfoDisplay = function () {
|
||||||
line = curserPos.row + 1;
|
line = curserPos.row + 1;
|
||||||
col = curserPos.column + 1;
|
col = curserPos.column + 1;
|
||||||
count = selectedText.length;
|
count = selectedText.length;
|
||||||
updateDisplay.apply(me);
|
updateDisplay();
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateDisplay() {
|
function updateDisplay() {
|
||||||
|
|
||||||
if (this.curserInfoElements.countVal.innerText !== count) {
|
if (me.curserInfoElements.countVal.innerText !== count) {
|
||||||
this.curserInfoElements.countVal.innerText = count;
|
me.curserInfoElements.countVal.innerText = count;
|
||||||
this.curserInfoElements.countVal.style.display = count ? 'inline' : 'none';
|
me.curserInfoElements.countVal.style.display = count ? 'inline' : 'none';
|
||||||
this.curserInfoElements.countLabel.style.display = count ? 'inline' : 'none';
|
me.curserInfoElements.countLabel.style.display = count ? 'inline' : 'none';
|
||||||
}
|
}
|
||||||
this.curserInfoElements.lnVal.innerText = line;
|
me.curserInfoElements.lnVal.innerText = line;
|
||||||
this.curserInfoElements.colVal.innerText = col;
|
me.curserInfoElements.colVal.innerText = col;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue