diff options
| -rw-r--r-- | doc/ScintillaHistory.html | 5 | ||||
| -rw-r--r-- | src/Editor.cxx | 6 | 
2 files changed, 10 insertions, 1 deletions
| diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html index f6e82f658..c14d090b3 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -600,6 +600,11 @@  	Fix TCL lexer recognizing '"' after "," inside a bracketed substitution.  	<a href="https://sourceforge.net/p/scintilla/bugs/1947/">Bug #1947</a>.  	</li> + 	<li> +	Fix garbage text from SCI_MOVESELECTEDLINESUP and SCI_MOVESELECTEDLINESDOWN +	for rectangular or thin selection by performing no action. +	<a href="https://sourceforge.net/p/scintilla/bugs/2078/">Bug #2078</a>. +	</li>      </ul>      <h3>         <a href="https://www.scintilla.org/scite413.zip">Release 4.1.3</a> 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; | 
