mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-17 00:44:19 +00:00
Made CodeDocument:: replaceAllContent apply a diff of only the changed regions.
This commit is contained in:
parent
9caac6d44e
commit
85e5fae0fd
2 changed files with 14 additions and 7 deletions
|
|
@ -38,6 +38,7 @@ CodeDocument& SourceCodeDocument::getCodeDocument()
|
|||
{
|
||||
codeDoc = new CodeDocument();
|
||||
reloadInternal();
|
||||
codeDoc->clearUndoHistory();
|
||||
}
|
||||
|
||||
return *codeDoc;
|
||||
|
|
@ -61,11 +62,8 @@ void SourceCodeDocument::reloadInternal()
|
|||
{
|
||||
jassert (codeDoc != nullptr);
|
||||
modDetector.updateHash();
|
||||
|
||||
ScopedPointer <InputStream> in (modDetector.getFile().createInputStream());
|
||||
|
||||
if (in != nullptr)
|
||||
codeDoc->loadFromStream (*in);
|
||||
codeDoc->replaceAllContent (modDetector.getFile().loadFileAsString());
|
||||
codeDoc->setSavePoint();
|
||||
}
|
||||
|
||||
bool SourceCodeDocument::save()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue