Fixed a bug in selection via keyboard (the problem described in bug

#716, comment #4)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20997 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stefano Ceccherini 2007-05-03 15:15:23 +00:00
parent ff32e5158c
commit 107ce0bba0

View File

@ -2861,10 +2861,12 @@ BTextView::HandleArrowKey(uint32 inArrowKey)
point.y -= height; point.y -= height;
fClickOffset = OffsetAt(point); fClickOffset = OffsetAt(point);
if (shiftDown) { if (shiftDown) {
if (fClickOffset >= fSelStart) if (fClickOffset != currentOffset) {
selEnd = fClickOffset; if (fClickOffset >= fSelStart)
else selEnd = fClickOffset;
selStart = fClickOffset; else
selStart = fClickOffset;
}
} }
break; break;
} }
@ -2876,10 +2878,12 @@ BTextView::HandleArrowKey(uint32 inArrowKey)
point.y += height; point.y += height;
fClickOffset = OffsetAt(point); fClickOffset = OffsetAt(point);
if (shiftDown) { if (shiftDown) {
if (fClickOffset <= fSelEnd) if (fClickOffset != currentOffset) {
selStart = fClickOffset; if (fClickOffset <= fSelEnd)
else selStart = fClickOffset;
selEnd = fClickOffset; else
selEnd = fClickOffset;
}
} }
break; break;
} }