mirror of
https://github.com/wavetermdev/xterm.js.git
synced 2026-08-05 13:43:48 -07:00
Clean up
This commit is contained in:
@@ -311,13 +311,11 @@ export class Buffer implements IBuffer {
|
||||
const marker = new Marker(y);
|
||||
this.markers.push(marker);
|
||||
marker.disposables.push(this._lines.addDisposableListener('trim', amount => {
|
||||
console.log('trim!' + amount);
|
||||
marker.line -= amount;
|
||||
// The marker should be disposed when the line is trimmed from the buffer
|
||||
if (marker.line < 0) {
|
||||
marker.dispose();
|
||||
}
|
||||
// TODO: handle splice?
|
||||
}));
|
||||
marker.on('dispose', () => this._removeMarker(marker));
|
||||
return marker;
|
||||
|
||||
@@ -1243,7 +1243,6 @@ export class Terminal extends EventEmitter implements ITerminal, IInputHandlingT
|
||||
|
||||
public scrollToLine(line: number): void {
|
||||
const scrollAmount = line - this.buffer.ydisp;
|
||||
console.log('scrollAmount', scrollAmount);
|
||||
if (scrollAmount !== 0) {
|
||||
this.scrollLines(scrollAmount);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user