Further fixing of xterm.fit

This commit is contained in:
paris
2014-08-16 03:53:22 +00:00
parent 3a782972e3
commit 7355a04274
+7 -1
View File
@@ -15,11 +15,17 @@ Terminal.prototype.fit = function () {
var container = this.rowContainer,
subjectRow = this.rowContainer.firstElementChild,
rows = parseInt(container.offsetHeight / subjectRow.offsetHeight),
contentBuffer,
characterWidth,
cols;
subjectRow.style.display = 'inline';
characterWidth = parseInt(subjectRow.offsetWidth / this.cols);
contentBuffer = subjectRow.textContent;
subjectRow.textContent = ' ';
characterWidth = parseInt(subjectRow.offsetWidth);
subjectRow.style.display = '';
cols = container.offsetWidth / characterWidth;