Disable reflow when winptyCompat is on

Fixes #1943
This commit is contained in:
Daniel Imms
2019-02-20 07:03:40 -08:00
parent abf6a9fa58
commit 3285374618
2 changed files with 7 additions and 1 deletions
+5 -1
View File
@@ -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
@@ -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;
+2
View File
@@ -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