diff --git a/runtime/ftplugin/sieve.vim b/runtime/ftplugin/sieve.vim index 8161fe99ac..1ea8eaeb9d 100644 --- a/runtime/ftplugin/sieve.vim +++ b/runtime/ftplugin/sieve.vim @@ -3,6 +3,7 @@ " Maintainer: This runtime file is looking for a new maintainer. " Previous Maintainer: Nikolai Weibull " Latest Revision: 2025 Feb 20 +" 2026 Jan 09 by Vim Project: preserve line endings for existing files #19144 if exists("b:did_ftplugin") finish @@ -16,4 +17,7 @@ setlocal formatoptions-=t formatoptions+=croql " https://datatracker.ietf.org/doc/html/rfc5228#section-2.2 says " "newlines (CRLF, never just CR or LF)" -setlocal fileformat=dos +" Use CRLF for new files only; preserve existing line endings +if expand('%:p') !=# '' && !filereadable(expand('%:p')) + setlocal fileformat=dos +endif