Repository navigation
terminal: keep a 133;P primary prompt on its own line and drop wrap padding - #247
Merged
Merged
Conversation
… its own line ble.sh pads a partial line past the right edge like zsh PROMPT_SP, and Ghostty's bash integration marks its prompt with 133;P instead of 133;A. Reflow still joins that prompt onto the padded row. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Extend the 133;A rule to an explicit primary prompt start. Ghostty's bash integration emits 133;P;k=i when ble.sh is active, and ble.sh pads a partial line into a soft-wrapped row before it, so Cloud terminals kept leaving prompt fragments behind on resize. Continuation and right prompts keep their wrap. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
When a primary prompt breaks the soft wrap into its row, the unstyled spaces that ran into that wrap were padding (zsh PROMPT_SP, ble.sh), not content. Kept, they reflow into extra blank rows of the partial line whenever the terminal narrows, and a shell redraw computed for the old width can land in them and print the prompt into that line again. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Warning Review limit reachedNext included review available in 3 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
1 task done
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.
Summary
Follow-up to #245. Cloud terminals (cmux-tui, bash with ble.sh) still left prompt fragments after an aggressive resize.
133;P;k=iinstead of133;A, because ble.sh cannot trackA's fresh-line. ble.sh pads a partial line past the right edge like zsh PROMPT_SP, so the prompt still starts at column 0 of a soft-wrapped row. An explicit primary prompt start (k=ior no kind) now breaks that wrap the same as133;A. Continuation (k=c,k=s) and right (k=r) prompts keep their wrap.%mark is styled, so the trim stops there.Testing
On a Blacksmith testbox (Linux, Zig 0.16.0):
Terminal: OSC133P after a padded partial line keeps the prompt on its own line across resize: red at f1906ae (expected 1, found 0, the prompt joined the padded row), green at c318e78. The padding assertion (narrowing to 5 columns keeps the cursor on row 1) is new in that test.Terminal: OSC133P continuation prompt keeps a soft wrappasses.zig build test-lib-vt: one failure,kitty temporary file medium preserves bool ABI, which also fails at the earlier pin on Linux./bin/bash,/etc/cmux/bashrc,prompt.bash, ble.sh nightly), a partial line, and 81 width changes at 4 ms intervals through an attached client: main was clean in 0 of 6 runs; this change plus cmux-tui shell injection was clean in 6 of 6.🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by cubic
Keeps
133;Pprimary prompts on their own line in Cloud terminals (cmux-tui, bash with ble.sh) so resize no longer leaves prompt fragments behind. An explicit primary prompt start (k=i) now breaks a soft wrap the same as133;A, and the wrap-padding spaces are cleared so they don't reflow into extra rows when the terminal narrows.k=c,k=s) and right (k=r) prompts keep their existing wrap behavior.%are preserved.Written for commit c318e78. Summary will update on new commits.