BufferService listen to onBufferActivate, remove tests

This commit is contained in:
Anthony Kim
2025-08-28 08:46:27 -07:00
parent 675b2c3a70
commit 753ea81fc0
5 changed files with 7 additions and 77 deletions
+3 -6
View File
@@ -37,6 +37,9 @@ export class BufferService extends Disposable implements IBufferService {
this.cols = Math.max(optionsService.rawOptions.cols || 0, MINIMUM_COLS);
this.rows = Math.max(optionsService.rawOptions.rows || 0, MINIMUM_ROWS);
this.buffers = this._register(new BufferSet(optionsService, this));
this._register(this.buffers.onBufferActivate(e => {
this._onScroll.fire(e.activeBuffer.ydisp);
}));
}
public resize(cols: number, rows: number): void {
@@ -149,10 +152,4 @@ export class BufferService extends Disposable implements IBufferService {
}
}
/**
* Synchronize the scroll position by firing a scroll event with the current buffer's ydisp.
*/
public syncScrollPosition(): void {
this._onScroll.fire(this.buffer.ydisp);
}
}
-1
View File
@@ -22,7 +22,6 @@ export interface IBufferService {
onScroll: Event<number>;
scroll(eraseAttr: IAttributeData, isWrapped?: boolean): void;
scrollLines(disp: number, suppressScrollEvent?: boolean): void;
syncScrollPosition(): void;
resize(cols: number, rows: number): void;
reset(): void;
}