Start isolating buffer attributes into Buffer class

This commit is contained in:
Paris Kasidiaris
2017-07-16 03:47:15 +03:00
committed by Paris Kasidiaris
parent 8ede1fc9d2
commit bbafdd3d06
8 changed files with 222 additions and 242 deletions
+2 -2
View File
@@ -83,7 +83,7 @@ export class Viewport {
}
// Sync scrollTop
const scrollTop = this.terminal.ydisp * this.currentRowHeight;
const scrollTop = this.terminal.buffer.ydisp * this.currentRowHeight;
if (this.viewportElement.scrollTop !== scrollTop) {
this.viewportElement.scrollTop = scrollTop;
}
@@ -96,7 +96,7 @@ export class Viewport {
*/
private onScroll(ev: Event) {
const newRow = Math.round(this.viewportElement.scrollTop / this.currentRowHeight);
const diff = newRow - this.terminal.ydisp;
const diff = newRow - this.terminal.buffer.ydisp;
this.terminal.scrollDisp(diff, true);
}