1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-19 01:04:20 +00:00

Projucer: Use the project line ending setting for auto-generated JUCE files and write the IDE project files using the native line endings

This commit is contained in:
ed 2018-11-28 15:32:15 +00:00
parent 3948e56486
commit 1f40a7b10e
14 changed files with 121 additions and 77 deletions

View file

@ -66,16 +66,10 @@ void SourceCodeDocument::reloadInternal()
auto fileContent = getFile().loadFileAsString();
auto lineFeed = [&]() -> const char*
{
if (fileContent.contains ("\r\n"))
return "\r\n";
auto lineFeed = getLineFeedForFile (fileContent);
if (fileContent.contains ("\n"))
return "\n";
return project->getProjectLineFeed().toRawUTF8();
}();
if (lineFeed.isEmpty())
lineFeed = project->getProjectLineFeed();
codeDoc->setNewLineCharacters (lineFeed);