Extract helper functions for line truncation and marker calculation
Improved readability by extracting complex logic into well-named helpers:
**1. apply_line_truncation()**
Centralizes the truncation decision logic:
- Global truncation offset applied to all lines
- Individual line truncation for lines exceeding width
- No truncation for lines that fit
Before: 8 lines of conditional logic inline
After: Single function call
**2. calculate_marker_position()**
Encapsulates all marker positioning logic:
- Determines column range based on error type (single/multi-line)
- Clamps to valid bounds
- Accounts for truncation offsets
- Calculates visible span length
Before: 45+ lines of complex nested logic
After: Single function call with clear parameters
**Benefits:**
- Main rendering loop is much easier to follow
- Logic can be tested independently
- Clear separation of concerns
- Self-documenting through function names
All 20 tests passing.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>