a7009a9688
The code for removing a newline at the end of a file was assuming that each `eol` in `possible_eols` would be 1 character in length. This assumption doesn't hold on Windows, where a newline is 2 characters long (`\r\n`). As a result, auto-formatting files that have a Windows-style line ending would result in the file's last line being terminated by `\r` (the full EOL cut in half, essentially). With this patch, we not only check that the last character of `stdoutdata` matches the candidate `eol`, but instead check the full sequence of characters depending on the length of `eol`. |
||
---|---|---|
.. | ||
autoformat.vim | ||
defaults.vim | ||
utils.vim |