aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2009-10-11 05:53:08 +0000
committernyamatongwe <devnull@localhost>2009-10-11 05:53:08 +0000
commit0c14ce0c2ed8361433034e19ee03734adb60857e (patch)
treeb4a88ef0029d6cadee07474b917881944224aa95 /src
parent1aa01f95869bae53f52a501b7970977c6963f8cc (diff)
downloadscintilla-mirror-0c14ce0c2ed8361433034e19ee03734adb60857e.tar.gz
Fix for bug #2871749 where rectangular selection Shift+Alt+Down could not
move through wrapped lines.
Diffstat (limited to 'src')
-rw-r--r--src/Editor.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx
index 45cf73bec..f4f78de86 100644
--- a/src/Editor.cxx
+++ b/src/Editor.cxx
@@ -4561,8 +4561,10 @@ void Editor::NewLine() {
}
void Editor::CursorUpOrDown(int direction, Selection::selTypes selt) {
- Point pt = PointMainCaret();
- int lineDoc = pdoc->LineFromPosition(sel.MainCaret());
+ SelectionPosition caretToUse = sel.IsRectangular() ?
+ sel.Rectangular().caret : sel.Range(sel.Main()).caret;
+ Point pt = LocationFromPosition(caretToUse);
+ int lineDoc = pdoc->LineFromPosition(caretToUse.Position());
Point ptStartLine = LocationFromPosition(pdoc->LineStart(lineDoc));
int subLine = (pt.y - ptStartLine.y) / vs.lineHeight;
int commentLines = vs.annotationVisible ? pdoc->AnnotationLines(lineDoc) : 0;