fix callstack overflow of writeSync

This commit is contained in:
Jörg Breitbart
2021-03-26 12:46:39 +01:00
parent 787ef30279
commit e106cd02cf
3 changed files with 65 additions and 20 deletions
+2 -2
View File
@@ -137,12 +137,12 @@ export abstract class CoreTerminal extends Disposable implements ICoreTerminal {
*
* @deprecated Unreliable, will be removed soon.
*/
public writeSync(data: string | Uint8Array): void {
public writeSync(data: string | Uint8Array, maxSubsequentCalls?: number): void {
if (this._logService.logLevel <= LogLevelEnum.WARN && !hasWriteSyncWarnHappened) {
this._logService.warn('writeSync is unreliable and will be removed soon.');
hasWriteSyncWarnHappened = true;
}
this._writeBuffer.writeSync(data);
this._writeBuffer.writeSync(data, maxSubsequentCalls);
}
public resize(x: number, y: number): void {