From d233b95753fa6455c1bf214039121386e2b6a70f Mon Sep 17 00:00:00 2001 From: Neil Date: Sun, 10 Feb 2019 19:25:48 +1100 Subject: Backport: Bug [#2078]. Tidying code. Backport of changeset 7252:25a0367e9349. --- src/Editor.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src') diff --git a/src/Editor.cxx b/src/Editor.cxx index fd21e47bb..b0a092720 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -1045,7 +1045,6 @@ void Editor::MoveSelectedLines(int lineDelta) { SelectionText selectedText; CopySelectionRange(&selectedText); - Sci::Position selectionLength = SelectionRange(selectionStart, selectionEnd).Length(); const Point currentLocation = LocationFromPosition(CurrentPosition()); const Sci::Line currentLine = LineFromLocation(currentLocation); @@ -1058,7 +1057,7 @@ void Editor::MoveSelectedLines(int lineDelta) { pdoc->InsertString(pdoc->Length(), eol, strlen(eol)); GoToLine(currentLine + lineDelta); - selectionLength = pdoc->InsertString(CurrentPosition(), selectedText.Data(), selectedText.Length()); + Sci::Position selectionLength = pdoc->InsertString(CurrentPosition(), selectedText.Data(), selectedText.Length()); if (appendEol) { const Sci::Position lengthInserted = pdoc->InsertString(CurrentPosition() + selectionLength, eol, strlen(eol)); selectionLength += lengthInserted; -- cgit v1.2.3