<p></p>
<p>I have a suspect. I haven't checked exactly how we read the files for unit tests but it could be that we use MIO_FILE so the underlying OS implementation is taken. Microsoft documentation for fgets()</p>
<p><a href="https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/fgets-fgetws?view=msvc-160" rel="nofollow">https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/fgets-fgetws?view=msvc-160</a></p>
<p>says</p>
<pre><code>...fgets reads characters from the current stream position to and including the first newline character...
</code></pre>
<p>and for <code>CRLF</code> line endings this means we could end with <code>CR</code> at the end of the line and then reading separate <code>LF</code>. (If this really is the case, it's just a purely idiotic way to implement this function.)</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/geany/geany/issues/2677#issuecomment-736338719">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAIOWJ5FJ3LIDNJK23JARBTSSSYZFANCNFSM4UGQMLEQ">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AAIOWJ6GZDGW4D2WBRPHTZTSSSYZFA5CNFSM4UGQMLE2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOFPR2GHY.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/geany/geany/issues/2677#issuecomment-736338719",
"url": "https://github.com/geany/geany/issues/2677#issuecomment-736338719",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>