mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-20 08:04:44 +00:00
Fix edit diff line number alignment and whitespace preservation
- Fix line numbers showing incorrect values for edits far from file start (e.g., 1,2,3 instead of 336,337,338). Skip count was added after displaying lines instead of before. - Rewrite splitIntoTokensWithAnsi in pi-tui to preserve whitespace as separate tokens instead of discarding it. Wrapped lines now maintain proper alignment and code indentation. - Update mom README: rename title, remove em-dashes for cleaner prose
This commit is contained in:
parent
932f48b0e9
commit
a59553a881
5 changed files with 192 additions and 183 deletions
|
|
@ -2,6 +2,12 @@
|
|||
|
||||
## [Unreleased]
|
||||
|
||||
### Fixed
|
||||
|
||||
- **Edit Diff Line Number Alignment**: Fixed two issues with diff display in the edit tool:
|
||||
1. Line numbers were incorrect for edits far from the start of a file (e.g., showing 1, 2, 3 instead of 336, 337, 338). The skip count for context lines was being added after displaying lines instead of before.
|
||||
2. When diff lines wrapped due to terminal width, the line number prefix lost its leading space alignment, and code indentation (spaces/tabs after line numbers) was lost. Rewrote `splitIntoTokensWithAnsi` in `pi-tui` to preserve whitespace as separate tokens instead of discarding it, so wrapped lines maintain proper alignment and indentation.
|
||||
|
||||
## [0.10.0] - 2025-11-27
|
||||
|
||||
### Added
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue