Change:
VS Code Version: 1.85.0-insider OS Version: Windows11 enable sticky scroll in terminal using "terminal.integrated.stickyScroll.enabled": true there are couple of issues I observed sometimes the output of prev. command get's stick along with the new command as shown in below image(cmd: git status) ! If I ran the same command first time (git status) then it does stick to the top at but If I ran the same command multiple times it no longer stick to the top. And there are couple of issues if I ran multiline command. Thanks But overall love this new feature!
Glad you like it! I notice you don't have the shell integration decorations to the left of the terminal, did you hide them?
Nope, I didn't hide anything there
Oh I was confused, I just noticed the shadow on sticky scroll. There were some major changes that went in recently, does this still happen on the latest?
I observed it in today's insider release. I believe that build is with those changes Not sure though
another favor, could you set this , create a new terminal and try again? I'm interested in where the little A, B, C and D letters are for the problem "sticky command": !
! I don't see any such setting there
You did it right, it's a hidden setting that should work despite saying unknown
Oh, I see I hope this will help ! ! running the same command(git status) multiple times and I could see those letters placed at the bottom on the terminal ! One more thing is whenever I open a new terminal I could see the box in the top right corner is this intended behaviour? !
One more thing I noticed all the time is whenever I run 'cls' on terminal it does clear the terminal except one line at the top after running cls(see scrollbar at the right side) ! and scroll a little up there is this line ! and then I reran the cls(2nd time) then it clears the terminal(now no scroll at the right) !
is this intended behaviour? Yep, this is an overlay we use to help improve shell integration. Thanks for this! I think the problem you're seeing is related to using , I'll have a look at improving how we handle that today. It would be great to get your follow up once I action it too
<!-- AUTHORVERIFICATIONREQUEST --This bug has been fixed in the latest release of ! you can help us out by commenting if things are now working as expected. If things still don't seem right, please ensure you're on version of Insiders (today's or later - you can use in the command palette to check), and leave a comment letting us know what isn't working as expected. Happy Coding!
Version: 1.85.0-insider (user setup) Commit: Date: 2023-11-30T05:35:40.559Z Electron: 25.9.6 ElectronBuildId: Chromium: 114.0.5735.289 18.15.0 V8: 11.4.183.29-electron.0 OS: Windows_NT x64 10.0. Well for me the issue is still there see the output of prev. command sticks to the top !
Reopening based on author comment

Discussion:
private _onCursorMoveListener = this._register(new MutableDisposable()); <del> private _recentlyPerformedCsiJ = false; </del> private _tryAdjustCommandStartMarkerScheduler?: RunOnceScheduler; private _tryAdjustCommandStartMarkerScannedLineCount: number = 0; private _tryAdjustCommandStartMarkerPollCount: number = 0;

super(); this._register(_terminal.parser.registerCsiHandler({ final: 'J' }, params => { <ins> // Clear commands when the viewport is cleared </ins> if (params.length >= 1 && (params[0] === 2 || params[0] === 3)) { <del> this._recentlyPerformedCsiJ = true; </del> this._hooks.clearCommandsInViewport(); } // We don't want to override xterm.js' default behavior, just augment it

})); this._register(this._capability.onBeforeCommandFinished(command => { <del> if (this._recentlyPerformedCsiJ) { this._recentlyPerformedCsiJ = false; return; } </del> // For older Windows backends we cannot listen to CSI J, instead we assume running clear // or cls will clear all commands in the viewport. This is not perfect but it's right // most of the time.