Optimize syntax word wrap without line numbers by KRRT7 · Pull Request #4177 · Textualize/rich · GitHub
Skip to content

Optimize syntax word wrap without line numbers - #4177

Open
KRRT7 wants to merge 2 commits into
Textualize:mainfrom
KRRT7:optimize-syntax-word-wrap
Open

KRRT7 wants to merge 2 commits into
Textualize:mainfrom
KRRT7:optimize-syntax-word-wrap

Conversation

@KRRT7

@KRRT7 KRRT7 commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

Summary

Optimizes Syntax(word_wrap=True, line_numbers=False) by batching wrapped rendering for the selected highlighted lines instead of calling console.render_lines(...) once per source line.

Closes #4176

Tests

  • python3 -m pytest tests/test_syntax.py tests/test_console.py

@codecov-commenter

codecov-commenter commented Jun 29, 2026 •

Copy link
Copy Markdown

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.

(perf) Syntax word wrap without line numbers repeatedly renders each source line

2 participants