fix(display): use newline instead of CUD to scroll at terminal bottom#95
Open
liamg wants to merge 1 commit intoreeflective:masterfrom
Open
fix(display): use newline instead of CUD to scroll at terminal bottom#95liamg wants to merge 1 commit intoreeflective:masterfrom
liamg wants to merge 1 commit intoreeflective:masterfrom
Conversation
MoveCursorDown (CUD / \x1b[1B) is a no-op when the cursor is on the
last line of the terminal. This caused ClearScreenBelow to erase the
prompt/input line instead of clearing below it, making the prompt
invisible whenever the input line was at the bottom of the screen.
Replace MoveCursorDown(1) with NewlineReturn ("\r\n") in Refresh and
renderHelpers. Unlike CUD, \r\n scrolls the terminal when at the
bottom, ensuring the cursor always advances to a new line before
clearing.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #95 +/- ##
==========================================
- Coverage 33.03% 32.55% -0.48%
==========================================
Files 57 58 +1
Lines 9109 9203 +94
==========================================
- Hits 3009 2996 -13
- Misses 6062 6169 +107
Partials 38 38 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Member
|
Hello ! Thanks for this. |
Contributor
Author
|
@maxlandon Yep, that's the main way I'm using it atm and it seems ok 👍 |
Member
|
Okay give me a few days and I will merge it. Very very busy at the moment... |
Contributor
Author
|
No rush at all, thank you! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
MoveCursorDown (CUD / \x1b[1B) is a no-op when the cursor is on the last line of the terminal. This caused ClearScreenBelow to erase the prompt/input line instead of clearing below it, making the prompt invisible whenever the input line was at the bottom of the screen.
Replace MoveCursorDown(1) with NewlineReturn ("\r\n") in Refresh and simplify renderHelpers. Unlike CUD, \r\n scrolls the terminal when at the bottom, ensuring the cursor always advances to a new line before clearing.
I've tested this on a few terminals and it seems to work well.