Skip to content

Commit f5b0fdd

Browse files
committed
Only propagate ED2 through conpty for the active buffer.
1 parent 8ae268f commit f5b0fdd

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/terminal/adapter/adaptDispatch.cpp

+4-2
Original file line numberDiff line numberDiff line change
@@ -3391,8 +3391,10 @@ bool AdaptDispatch::_EraseAll()
33913391
// terminal application. While we're in conpty mode, when the client
33923392
// requests a Erase All operation, we need to manually tell the
33933393
// connected terminal to do the same thing, so that the terminal will
3394-
// move it's own buffer contents into the scrollback.
3395-
return !inPtyMode;
3394+
// move it's own buffer contents into the scrollback. But this only
3395+
// applies if we're in the active buffer, since this should have no
3396+
// visible effect for an inactive buffer.
3397+
return !(inPtyMode && textBuffer.IsActiveBuffer());
33963398
}
33973399

33983400
//Routine Description:

0 commit comments

Comments
 (0)