Don't move up zero steps#2103
Closed
merklegroot wants to merge 3 commits into
Closed
Conversation
Contributor
Author
|
Expanded the change to add the same guard clauses for the other cursor movement methods. |
Contributor
|
Looks good to me. Move this out of draft and I'll make sure it gets merged |
Prevents terminal inconsistencies with \e[0A \e[0B \e[0C \e[0D etc. Applies the same guard to CursorUp/Down/Forward/Backward/NextLine/PreviousLine. Fixes spectreconsole#2076
Contributor
|
@merklegroot Any specific reason you closed the PR? |
Contributor
Author
Couldn't get it to pick up the updates in the fork, so I remade it. |
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.
Fixes #2076
Checklist
Changes
When AnsiWriter.CursorUp(0) is called, I changed it to treat that as a no-op.
Different ANSI terminals are inconsistent about handle \x1b[0A (move up 0 lines)
https://unix.stackexchange.com/questions/559308/what-ansi-escape-0x1b0a-and-other-0-value-codes-should-do
(Most treat the zero as meaning move up the default number of lines and one line is the default.)
This resolves the Live display bug reported in #2076.
Tested on .NET 10.0 — relevant Live tests pass.
AI Disclosure
I used Cursor and Grok for assistance.