Files
tty7/src
l0ng-ai 5ce0fbdd5a fix(editor): give a saved file back the line endings it arrived with
Enter belongs to the input widget and inserts a bare \n whatever the file
around it does. Editing one line of a file checked out with CRLF therefore
mixed the two endings, and git reports that as a rewrite of lines the user
never visited.

The buffer still keeps the exact bytes it was given — that part was already
right, and there are now tests holding it there, along with hard tabs and a
missing final newline. What changed is the save: a file that arrived
uniformly CRLF goes back out uniformly CRLF. Deliberately unanimous, so a
file that already mixes its endings is still written exactly as found rather
than being handed a winner it never asked for.

Saving had no test at all before this; the new one writes a real file and
reads the bytes back.
2026-08-23 09:06:20 +08:00
..