aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2019-02-10 19:25:48 +1100
committerNeil <nyamatongwe@gmail.com>2019-02-10 19:25:48 +1100
commitd99a0d695ec043f91dd58fcf528f00f8dd41e36e (patch)
treebd6657bd3973e59330e4c406e2d30b0c349674c3
parentc2bf7c9b5c090d18022bcd990414b5a0c0b587c8 (diff)
downloadscintilla-mirror-d99a0d695ec043f91dd58fcf528f00f8dd41e36e.tar.gz
Bug [#2078]. Tidying code.
-rw-r--r--src/Editor.cxx3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx
index baf5917e9..074c2a45a 100644
--- a/src/Editor.cxx
+++ b/src/Editor.cxx
@@ -1048,7 +1048,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);
@@ -1061,7 +1060,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;