Merge pull request #230 from ayapi/refresh-viewport-height

Refresh the height of the viewport when the line-height changed
This commit is contained in:
Paris Kasidiaris
2016-08-18 20:35:39 +03:00
committed by GitHub
2 changed files with 16 additions and 2 deletions
+12
View File
@@ -75,6 +75,18 @@ describe('Viewport', function () {
assert.equal(viewportElement.style.lineHeight, '1px');
assert.equal(terminal.rowContainer.style.lineHeight, '1px');
});
it('should set the height of the viewport when the line-height changed', function () {
terminal.lines.push('');
terminal.lines.push('');
terminal.rows = 1;
viewport.refresh();
assert.equal(viewportElement.style.height, 1 * CHARACTER_HEIGHT + 'px');
charMeasureElement.getBoundingClientRect = function () {
return { width: null, height: 20 };
};
viewport.refresh();
assert.equal(viewportElement.style.height, 20 + 'px');
});
});
describe('syncScrollArea', function () {