diff --git a/src/addons/fit/fit.js b/src/addons/fit/fit.js index 11fc6eb7..390cc0e9 100644 --- a/src/addons/fit/fit.js +++ b/src/addons/fit/fit.js @@ -56,7 +56,7 @@ subjectRow.innerHTML = 'W'; // Common character for measuring width, although on monospace characterWidth = subjectRow.getBoundingClientRect().width; subjectRow.style.display = ''; // Revert style before calculating height, since they differ. - characterHeight = parseInt(subjectRow.offsetHeight); + characterHeight = parseFloat(term.rowContainer.style.lineHeight); subjectRow.innerHTML = contentBuffer; rows = parseInt(availableHeight / characterHeight);