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
Editing a file that uses CRLF line endings with the edit tool rewrites the whole file with LF line endings. The tool docstring says the original line ending is restored after replacement, but Path.read_text() reads in universal-newline mode, so \r\n is already \n when detect_line_ending() runs and LF is always chosen.
Any edit to a CRLF file produces a diff that touches every line. On Windows, Path.write_text() also translates \n to \r\n on write, so the restore step could produce \r\r\n once detection works.
Activity