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:
parent
85baf76e1a
commit
3091f56a1a
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user