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
+3 -3
View File
@@ -281,7 +281,7 @@ export class SelectionManager extends EventEmitter {
coords[0]--;
coords[1]--;
// Convert viewport coords to buffer coords
coords[1] += this._terminal.ydisp;
coords[1] += this._terminal.buffer.ydisp;
return coords;
}
@@ -476,9 +476,9 @@ export class SelectionManager extends EventEmitter {
this._terminal.scrollDisp(this._dragScrollAmount, false);
// Re-evaluate selection
if (this._dragScrollAmount > 0) {
this._model.selectionEnd = [this._terminal.cols - 1, this._terminal.ydisp + this._terminal.rows];
this._model.selectionEnd = [this._terminal.cols - 1, this._terminal.buffer.ydisp + this._terminal.rows];
} else {
this._model.selectionEnd = [0, this._terminal.ydisp];
this._model.selectionEnd = [0, this._terminal.buffer.ydisp];
}
this.refresh();
}