diff options
-rw-r--r-- | src/Editor.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx index 72a8a4bd8..68fd83e7a 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -1058,8 +1058,7 @@ void Editor::MoveSelectedLines(int lineDelta) { } SetSelection(selectionStart, selectionEnd); - SelectionText selectedText; - CopySelectionRange(&selectedText); + const std::string selectedText = RangeText(selectionStart, selectionEnd); const Point currentLocation = LocationFromPosition(CurrentPosition()); const Sci::Line currentLine = LineFromLocation(currentLocation); @@ -1073,7 +1072,7 @@ void Editor::MoveSelectedLines(int lineDelta) { pdoc->InsertString(pdoc->Length(), eol, strlen(eol)); GoToLine(currentLine + lineDelta); - Sci::Position selectionLength = pdoc->InsertString(CurrentPosition(), selectedText.Data(), selectedText.Length()); + Sci::Position selectionLength = pdoc->InsertString(CurrentPosition(), selectedText); if (appendEol) { const Sci::Position lengthInserted = pdoc->InsertString(CurrentPosition() + selectionLength, eol, strlen(eol)); selectionLength += lengthInserted; |