shell: Prevent buggy moving zero column behavior#1678
Merged
bakpakin merged 1 commit intojanet-lang:masterfrom Dec 7, 2025
Merged
shell: Prevent buggy moving zero column behavior#1678bakpakin merged 1 commit intojanet-lang:masterfrom
bakpakin merged 1 commit intojanet-lang:masterfrom
Conversation
Contributor
|
I thought the changes were working, but when I tried a few times, I noticed some odd behavior (not sure if it's the changes from this PR). The way I verified was to set the dynamic variable Before applying 878cc65 (note that the cursor is not all the way to the left):
After applying 878cc65:
Not sure what is going on here... FWIW: |
Contributor
Author
|
I know the reason. Will revise the patch later. |
According to https://unix.stackexchange.com/a/559331, moving zero column is implemented inconsistently between different terminal emulators. In order to fix this inconsistency, we avoid using this escape sequence entirely. Signed-off-by: Tw <tw19881113@gmail.com> Change-Id: I73d4252f8472c769f0cf98b6bbdf2b3d6a6a6964
878cc65 to
6e883b8
Compare
Contributor
Author
|
@sogaiu I've fixed the bug in the previous version and verified on my side. You could give it a double confirm. |
Contributor
|
@tw4452852 Tried it a few times and it seems to be working better 👍
|
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.



According to https://unix.stackexchange.com/a/559331, moving zero column is implemented inconsistently between different terminal emulators.
In order to fix this inconsistency,
we avoid using this escape sequence entirely.
BTW, this fix is ported from janet-lang/spork#262
Change-Id: I73d4252f8472c769f0cf98b6bbdf2b3d6a6a6964