fix(painter): keep the right prompt through the exit erase - #1211
Merged
kronberger-droid merged 1 commit intoSep 11, 2026
Merged
Conversation
The unconditional erase from nushell#1145 also clears the cursor's own row to the right, which is where the right prompt sits. Reported as nushell/nushell#19001. Narrowing the clear would undo nushell#1145: the hint it exists to erase sits after the cursor on the same row, exactly where the right prompt does. Thus the erase stays and the right prompt goes back afterwards.
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
Fallout from #1145, which made the exit erase unconditional so a menu or a
hint could not survive into the recorded line.
ClearType::FromCursorDownalso clears the cursor's own row to the right, which is where the right
prompt sits, and only
after_cursor_lineswas ever put back.Narrowing the clear would undo #1145: the hint it exists to erase sits after
the cursor on the same row, exactly where the right prompt does. So the
erase stays and the right prompt is restored after it. Its color is captured
at paint time, since the caller sets the color around
print_right_promptrather than inside it, and the exit has no
promptto ask.No public API change; the new field is private to
Painter.Additional notes
fixes #1212