mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Tweaked the internals of CodeDocument::replaceSection so that replacing a section doesn't mess-up the position of CodeDocument::Position objects that are positioned at its start and end.
This commit is contained in:
parent
331ce9ff8c
commit
eefbcef611
1 changed files with 2 additions and 3 deletions
|
|
@ -577,9 +577,8 @@ void CodeDocument::insertText (const int insertIndex, const String& text)
|
|||
|
||||
void CodeDocument::replaceSection (const int start, const int end, const String& newText)
|
||||
{
|
||||
insertText (start, newText);
|
||||
const int newTextLen = newText.length();
|
||||
deleteSection (start + newTextLen, end + newTextLen);
|
||||
insertText (end, newText);
|
||||
deleteSection (start, end);
|
||||
}
|
||||
|
||||
void CodeDocument::applyChanges (const String& newContent)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue