You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(diff): correct inline highlight offsets for tab and whitespace changes
Diff on raw code so whitespace-only changes (e.g. tab to spaces) are
detected, then map raw offsets to rendered offsets using expandtabs
column semantics with a defensive fallback if lengths mismatch.
- Add _build_offset_map using expandtabs column tracking with bounded
monotonic fallback when rendered length diverges
- Reuse highlighted Text objects for skipped (low-similarity) pairs to
avoid redundant highlighting
- Preserve trailing whitespace in highlighted output (strip only the
newline Pygments appends, not meaningful trailing spaces)
- Use public Text.spans instead of private Text._spans in tests
- Add tests for tab-indented diffs, tab-to-space changes, mixed
tab+space edits, precise per-character offsets, and trailing
whitespace preservation
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,6 +32,7 @@ Only write entries that are worth mentioning to users.
32
32
- Shell: Add `/undo` and `/fork` commands for session forking — `/undo` lets you pick a previous turn and fork a new session with the selected message pre-filled for re-editing; `/fork` duplicates the entire session history into a new session; the original session is always preserved
33
33
- CLI: Add `-r` as a short alias for `--session` and print a resume hint (`kimi -r <session-id>`) whenever a session exits — covers normal exit, Ctrl-C, `/undo`, `/fork`, and `/sessions` switch so users can always find their way back
34
34
- Core: Fix `custom_headers` not being passed to non-Kimi providers — OpenAI, Anthropic, Google GenAI, and Vertex AI providers now correctly forward custom headers configured in `providers.*.custom_headers`
35
+
- Shell: Fix inline diff highlights misaligned on lines containing tabs — raw-code diff offsets are now mapped to rendered positions via expandtabs column tracking so highlight spans land correctly after tab expansion
0 commit comments