diff options
author | Neil <nyamatongwe@gmail.com> | 2019-02-10 19:25:48 +1100 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2019-02-10 19:25:48 +1100 |
commit | d233b95753fa6455c1bf214039121386e2b6a70f (patch) | |
tree | 2f63bf6c11c692b195edb06d07204350c89f586e /src | |
parent | c2fed374732bfece2e47c759f7d74b35bf743481 (diff) | |
download | scintilla-mirror-d233b95753fa6455c1bf214039121386e2b6a70f.tar.gz |
Backport: Bug [#2078]. Tidying code.
Backport of changeset 7252:25a0367e9349.
Diffstat (limited to 'src')
-rw-r--r-- | src/Editor.cxx | 3 |
1 files changed, 1 insertions, 2 deletions
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; |