Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/Buffer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ export class Buffer implements IBuffer {

this.scrollBottom = newRows - 1;

if (this._hasScrollback) {
if (this._isReflowEnabled) {
this._reflow(newCols, newRows);

// Trim the end of the line off if cols shrunk
Expand All @@ -226,6 +226,10 @@ export class Buffer implements IBuffer {
this._rows = newRows;
}

private get _isReflowEnabled(): boolean {
return this._hasScrollback && !(this._terminal as any).isWinptyCompatEnabled;
}

private _reflow(newCols: number, newRows: number): void {
if (this._cols === newCols) {
return;
Expand Down
2 changes: 2 additions & 0 deletions src/addons/winptyCompat/winptyCompat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ export function winptyCompatInit(terminal: Terminal): void {
return;
}

(addonTerminal._core as any).isWinptyCompatEnabled = true;

// Winpty does not support wraparound mode which means that lines will never
// be marked as wrapped. This causes issues for things like copying a line
// retaining the wrapped new line characters or if consumers are listening
Expand Down