Skip to content

Commit 14c6df3

Browse files
authored
Merge pull request #4458 from Tyriar/tyriar/178014
Clear line wrapped state on explicit line feed
2 parents 37297e0 + 18be346 commit 14c6df3

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/common/InputHandler.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -711,6 +711,13 @@ export class InputHandler extends Disposable implements IInputHandler {
711711
this._bufferService.scroll(this._eraseAttrData());
712712
} else if (this._activeBuffer.y >= this._bufferService.rows) {
713713
this._activeBuffer.y = this._bufferService.rows - 1;
714+
} else {
715+
// There was an explicit line feed (not just a carriage return), so clear the wrapped state of
716+
// the line. This is particularly important on conpty/Windows where revisiting lines to
717+
// reprint is common, especially on resize. Note that the windowsMode wrapped line heuristics
718+
// can mess with this so windowsMode should be disabled, which is recommended on Windows build
719+
// 21376 and above.
720+
this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y)!.isWrapped = false;
714721
}
715722
// If the end of the line is hit, prevent this action from wrapping around to the next line.
716723
if (this._activeBuffer.x >= this._bufferService.cols) {

0 commit comments

Comments
 (0)