[PR #2996] [MERGED] CUU and CUD should not move "across" margins. #25190

Open
opened 2026-01-31 09:07:51 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/2996
Author: @zadjii-msft
Created: 9/30/2019
Status: Merged
Merged: 10/1/2019
Merged by: @DHowett-MSFT

Base: masterHead: dev/migrie/b/2929-cuu-cud-across-the-universe


📝 Commits (5)

  • 13dbcf0 I think this is the fix
  • ca897f4 add a test from github
  • 19744fb add another related test
  • 2cb9df8 add tests for another case I thought of
  • 2e2f529 fix bugs @j4james found

📊 Changes

2 files changed (+206 additions, -9 deletions)

View changed files

📝 src/host/getset.cpp (+35 -9)
📝 src/host/ut_host/ScreenBufferTests.cpp (+171 -0)

📄 Description

Summary of the Pull Request

If we're moving the cursor up, its vertical movement should be stopped at the top margin. It should not magically jump up to the bottom margin. Similarly, this applies to moving down and the bottom margin. Furthermore, this constraint should always apply, not just when the start position is within BOTH margins

References

#170

PR Checklist

Detailed Description of the Pull Request / Additional comments

Shout-out to @j4james as always, for keeping the VT implementation honest 😋


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/microsoft/terminal/pull/2996 **Author:** [@zadjii-msft](https://github.com/zadjii-msft) **Created:** 9/30/2019 **Status:** ✅ Merged **Merged:** 10/1/2019 **Merged by:** [@DHowett-MSFT](https://github.com/DHowett-MSFT) **Base:** `master` ← **Head:** `dev/migrie/b/2929-cuu-cud-across-the-universe` --- ### 📝 Commits (5) - [`13dbcf0`](https://github.com/microsoft/terminal/commit/13dbcf0b2ee9e8410e30df7c870bf2c6193893b8) I think this is the fix - [`ca897f4`](https://github.com/microsoft/terminal/commit/ca897f49e03d22b10fd5782dd0d2ae6084487b79) add a test from github - [`19744fb`](https://github.com/microsoft/terminal/commit/19744fba9bcf0471d0279218b405eec9bda3cc1a) add another related test - [`2cb9df8`](https://github.com/microsoft/terminal/commit/2cb9df8565097b973b1ae498e35dd1dda3be4ad8) add tests for another case I thought of - [`2e2f529`](https://github.com/microsoft/terminal/commit/2e2f52921f10d2a58ae2ab2b02ba764621b4c56d) fix bugs @j4james found ### 📊 Changes **2 files changed** (+206 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `src/host/getset.cpp` (+35 -9) 📝 `src/host/ut_host/ScreenBufferTests.cpp` (+171 -0) </details> ### 📄 Description ## Summary of the Pull Request If we're moving the cursor up, its vertical movement should be stopped at the top margin. It should not magically jump up to the bottom margin. Similarly, this applies to moving down and the bottom margin. Furthermore, this constraint should always apply, not just when the start position is within BOTH margins ## References #170 ## PR Checklist * [x] Closes #2929 * [x] I work here * [x] Tests added/passed * [n/a] Requires documentation to be updated ## Detailed Description of the Pull Request / Additional comments Shout-out to @j4james as always, for keeping the VT implementation honest 😋 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:07:51 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#25190