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:
parent
3948e56486
commit
1f40a7b10e
14 changed files with 121 additions and 77 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue