Claude Code v2.1.311 ·
Write previews now fit long lines and count hidden characters
The preview shown after Claude writes a file now trims by wrapped screen rows and says how many characters are hidden, not just how many lines
You'll noticeTier: how much it should matter to you
2Useful: my rating, 1 to 5
1Signal: worth watching, 1 to 5
Terminal UIArea: what it touches
ImprovementsKind: in v2.1.311,
ImprovementsSection of the release
What
When Claude creates or overwrites a file with the Write tool, Claude Code shows a short preview of what was written. That preview now:
- works out how many screen rows each line takes once it wraps
- sizes its box to the width of your terminal
- cuts the preview off by wrapped rows instead of by raw line count
- tells the truncation notice how many characters are hidden, as well as how many lines
Before, it cut the preview off by counting raw lines only.
Why
Files with very long lines no longer give a misleading preview, because a single long line can fill many rows on screen.
See this entry in the whole of v2.1.311 →