Fix VT scroll margins leaking between pages - #20523
Conversation
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
|
I haven't actually tested this PR, but I think it may require some additional code in the When that mode is set, the cursor position is relative to the margin origin (now potentially different per page), so the absolute cursor position can change when moving between pages. It may also be necessary to clamp the position along the bottom right boundaries if moving to a page with smaller margins, otherwise the cursor can end up outside the permitted range. |
|
Thanks, you were right. I updated I also added |
James Holderness (j4james)
left a comment
There was a problem hiding this comment.
Overall I think the code looks good. I just have a couple of suggestions which I think might improve the readability.
Summary of the Pull Request
Store VT scroll margins on each page's
TextBufferso DECSTBM and DECSLRM settings do not leak between VT pages.Preserve the existing behavior of sharing margins across main and alternate screen buffers.
References and Relevant Issues
Closes #19625
Detailed Description of the Pull Request / Additional comments
AdaptDispatchtoTextBuffer.No documentation or schema changes are required.
Validation Steps Performed
Host.UnitTests.vcxprojandAdapter.UnitTests.vcxprojfor Debug x64.PageMarginsAreIndependentTest: 1 passed.VtScrollMarginsAltBufferInheritance: 1 passed.PageMovementWithOriginModeTest: 1 passed.TextBufferTests: 70 passed, 0 failed.git diff --checkpassed with CRLF handling.PR Checklist