ZIm/crates/fs/src
张小白 d8980c25d2
windows: Remove extra empty line when loading default settings (#30344)
On Windows, lines in a file end with `\r\n`, so using
`chunk.split('\n')` leaves a trailing `\r` at the end of each line. This
ends up introducing extra blank lines in the final output.

I didn't use `chunk.split('\r\n')` because some of the input have
already had its line endings normalized to just `\n`. If we switch to
splitting on `\r\n`, that input wouldn't be handled correctly.

#### Before


https://github.com/user-attachments/assets/22cc5a79-c3a7-4824-a3bc-d66d2261852f

#### After



https://github.com/user-attachments/assets/720f1d67-75e6-482d-b6a5-9f3aa9f321ce



Release Notes:

- N/A
2025-05-09 19:00:16 +08:00
..
fake_git_repo.rs Improve handling of remote-tracking branches in the picker (#29744) 2025-05-01 21:24:26 -04:00
fs.rs windows: Remove extra empty line when loading default settings (#30344) 2025-05-09 19:00:16 +08:00
fs_watcher.rs chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
mac_watcher.rs git: Add support for opening git worktrees (#20164) 2024-11-06 09:43:39 +01:00