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