Skip to content

Fixed background color carrying over onto the following line when soft wrapping is enabled.#3839

Closed
kmvanbrunt wants to merge 2 commits intoTextualize:masterfrom
kmvanbrunt:removed_styled_newlines
Closed

Fixed background color carrying over onto the following line when soft wrapping is enabled.#3839
kmvanbrunt wants to merge 2 commits intoTextualize:masterfrom
kmvanbrunt:removed_styled_newlines

Conversation

@kmvanbrunt
Copy link
Copy Markdown

Type of changes

  • Bug fix
  • Tests

Checklist

  • I've run the latest black with default args on new code.
  • I've updated CHANGELOG.md and CONTRIBUTORS.md where appropriate.
  • I've added tests for new code.
  • I accept that @willmcgugan may be pedantic in the code review.

Description

Fixes #3838

Removes styled newlines before printing to ensure background color does not carry over to the following line. This change copies the behavior seen when soft wrapping is disabled, where rich correctly separates newlines from styled content.

@kmvanbrunt kmvanbrunt force-pushed the removed_styled_newlines branch from a2485cf to b56078e Compare September 16, 2025 06:08
@kmvanbrunt
Copy link
Copy Markdown
Author

Closing since this was fixed in #3938.
Thank you @willmcgugan for the fix.

@kmvanbrunt kmvanbrunt closed this Jan 24, 2026
@kmvanbrunt kmvanbrunt deleted the removed_styled_newlines branch April 19, 2026 02:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Background color carries over onto the following line when soft wrapping is enabled.

1 participant