more bugs fixed in keyboard text selection

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18956 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stefano Ceccherini 2006-09-28 11:38:56 +00:00
parent 85baf76e1a
commit 3091f56a1a

View File

@ -2844,15 +2844,14 @@ BTextView::HandleArrowKey(uint32 inArrowKey)
if (shiftDown) {
fClickOffset = PreviousInitialByte(fClickOffset);
if (fClickOffset != currentOffset) {
if (fClickOffset >= fSelStart) {
selStart = fSelStart;
if (fClickOffset >= fSelStart)
selEnd = fClickOffset;
} else {
else
selStart = fClickOffset;
selEnd = fSelEnd;
}
}
} else
} else if (fSelStart != fSelEnd)
fClickOffset = fSelStart;
else
fClickOffset = PreviousInitialByte(fSelStart);
break;
@ -2861,15 +2860,14 @@ BTextView::HandleArrowKey(uint32 inArrowKey)
if (shiftDown) {
fClickOffset = NextInitialByte(fClickOffset);
if (fClickOffset != currentOffset) {
if (fClickOffset <= fSelEnd) {
if (fClickOffset <= fSelEnd)
selStart = fClickOffset;
selEnd = fSelEnd;
} else {
selStart = fSelStart;
else
selEnd = fClickOffset;
}
}
} else
} else if (fSelStart != fSelEnd)
fClickOffset = fSelEnd;
else
fClickOffset = NextInitialByte(fSelEnd);
break;
@ -2880,7 +2878,7 @@ BTextView::HandleArrowKey(uint32 inArrowKey)
point.y -= height;
fClickOffset = OffsetAt(point);
if (shiftDown) {
if (fClickOffset > fSelStart)
if (fClickOffset >= fSelStart)
selEnd = fClickOffset;
else
selStart = fClickOffset;
@ -2895,7 +2893,7 @@ BTextView::HandleArrowKey(uint32 inArrowKey)
point.y += height;
fClickOffset = OffsetAt(point);
if (shiftDown) {
if (fClickOffset < fSelEnd)
if (fClickOffset <= fSelEnd)
selStart = fClickOffset;
else
selEnd = fClickOffset;