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

Optimize syntax word wrap without line numbers#4177
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

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@9d8f9a3). Learn more about missing BASE report.
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4177   +/-   ##
=======================================
  Coverage        ?   97.81%           
=======================================
  Files           ?       96           
  Lines           ?     8390           
  Branches        ?        0           
=======================================
  Hits            ?     8207           
  Misses          ?      183           
  Partials        ?        0           
Flag Coverage Δ
unittests 97.81% <100.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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