aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Editor.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx
index 483d51799..baf5917e9 100644
--- a/src/Editor.cxx
+++ b/src/Editor.cxx
@@ -1005,6 +1005,10 @@ void Editor::VerticalCentreCaret() {
void Editor::MoveSelectedLines(int lineDelta) {
+ if (sel.IsRectangular()) {
+ return;
+ }
+
// if selection doesn't start at the beginning of the line, set the new start
Sci::Position selectionStart = SelectionStart().Position();
const Sci::Line startLine = pdoc->SciLineFromPosition(selectionStart);
@@ -1057,7 +1061,7 @@ void Editor::MoveSelectedLines(int lineDelta) {
pdoc->InsertString(pdoc->Length(), eol, strlen(eol));
GoToLine(currentLine + lineDelta);
- selectionLength = pdoc->InsertString(CurrentPosition(), selectedText.Data(), selectionLength);
+ selectionLength = pdoc->InsertString(CurrentPosition(), selectedText.Data(), selectedText.Length());
if (appendEol) {
const Sci::Position lengthInserted = pdoc->InsertString(CurrentPosition() + selectionLength, eol, strlen(eol));
selectionLength += lengthInserted;