Skip to content

Commit

Permalink
Merge a35cd43 into 6ad6a01
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyriar committed Feb 20, 2019
2 parents 6ad6a01 + a35cd43 commit c0acd03
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
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

0 comments on commit c0acd03

Please sign in to comment.