mirror of
https://github.com/neovim/neovim.git
synced 2026-08-19 02:24:46 -05:00
Only set fileformat=dos for new files; preserve existing line endings when editing. This satisfies RFC 5228 for new files while avoiding issues with version control and existing workflows. The previous change (3cb4148) unconditionally set fileformat=dos, which converts existing files with LF line endings to CRLF on save. This causes issues with version control (entire file appears changed) and breaks workflows where sieve files are stored with unix line endings. Dovecot Pigeonhole (the main sieve implementation) has explicitly accepted LF line endings since 2008 (commit 97b967b5): /* Loose LF is allowed (non-standard) and converted to CRLF */ This behavior has remained unchanged for almost 18 years. closes: vim/vim#19144 https://github.com/vim/vim/commit/fc00006777594f969ba8fcff676e6ca1bcb43546 Co-authored-by: André-Patrick Bubel <code@apb.name> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>