vim-patch:7.4.643

Problem:    Using the default file format for Mac files. (Issue 77)
Solution:   Reset the try_mac counter in the right place. (Oswald)

c6b7217ff5
This commit is contained in:
watiko
2016-02-03 06:25:49 +09:00
parent 5308585adf
commit f104ce2d15
4 changed files with 51 additions and 28 deletions

View File

@@ -1543,12 +1543,12 @@ rewind_retry:
if (fileformat == EOL_UNKNOWN) {
/* First try finding a NL, for Dos and Unix */
if (try_dos || try_unix) {
for (p = ptr; p < ptr + size; ++p) {
// Reset the carriage return counter.
if (try_mac) {
try_mac = 1;
}
// Reset the carriage return counter.
if (try_mac) {
try_mac = 1;
}
for (p = ptr; p < ptr + size; ++p) {
if (*p == NL) {
if (!try_unix
|| (try_dos && p > ptr && p[-1] == CAR))