|
filesystem: strip trailing newline in _number_diff so diff lines aren't blank-separated
_unified_diff (used by edit_lines / smart_edit) feeds difflib with "line + \n" so difflib does not emit a "\ No newline at end of file" marker. With lineterm="" difflib keeps that trailing "\n" on content lines, so the final "\n".join produced "\n\n" between every diff line — a blank line between each, bloating the model-facing output and rendering with double spacing in both clients. Strip the trailing "\n" in _number_diff before processing; no-op for the _diff action, whose lines come from splitlines() without trailing newlines. |
|---|
|
|
| navi/tools/filesystem.py |
|---|
| tests/unit/tools/test_filesystem.py |
|---|