mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
commit
cd1be8350d
@ -1544,6 +1544,11 @@ rewind_retry:
|
|||||||
/* First try finding a NL, for Dos and Unix */
|
/* First try finding a NL, for Dos and Unix */
|
||||||
if (try_dos || try_unix) {
|
if (try_dos || try_unix) {
|
||||||
for (p = ptr; p < ptr + size; ++p) {
|
for (p = ptr; p < ptr + size; ++p) {
|
||||||
|
// Reset the carriage return counter.
|
||||||
|
if (try_mac) {
|
||||||
|
try_mac = 1;
|
||||||
|
}
|
||||||
|
|
||||||
if (*p == NL) {
|
if (*p == NL) {
|
||||||
if (!try_unix
|
if (!try_unix
|
||||||
|| (try_dos && p > ptr && p[-1] == CAR))
|
|| (try_dos && p > ptr && p[-1] == CAR))
|
||||||
@ -1551,6 +1556,8 @@ rewind_retry:
|
|||||||
else
|
else
|
||||||
fileformat = EOL_UNIX;
|
fileformat = EOL_UNIX;
|
||||||
break;
|
break;
|
||||||
|
} else if (*p == CAR && try_mac) {
|
||||||
|
try_mac++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1571,6 +1578,10 @@ rewind_retry:
|
|||||||
if (try_mac > try_unix)
|
if (try_mac > try_unix)
|
||||||
fileformat = EOL_MAC;
|
fileformat = EOL_MAC;
|
||||||
}
|
}
|
||||||
|
} else if (fileformat == EOL_UNKNOWN && try_mac == 1) {
|
||||||
|
// Looking for CR but found no end-of-line markers at all:
|
||||||
|
// use the default format.
|
||||||
|
fileformat = default_fileformat();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -361,7 +361,7 @@ static int included_patches[] = {
|
|||||||
// 638 NA
|
// 638 NA
|
||||||
637,
|
637,
|
||||||
636,
|
636,
|
||||||
// 635,
|
635,
|
||||||
// 634,
|
// 634,
|
||||||
633,
|
633,
|
||||||
// 632 NA
|
// 632 NA
|
||||||
|
Loading…
Reference in New Issue
Block a user