parent
0d3bd614c7
commit
74f911be74
@ -3505,8 +3505,17 @@ BTextView::_HandleArrowKey(uint32 inArrowKey, bool commandKeyDown)
|
||||
else {
|
||||
float height;
|
||||
BPoint point = PointAt(fCaretOffset, &height);
|
||||
point.y -= height;
|
||||
fCaretOffset = OffsetAt(point);
|
||||
// find the caret position on the previous
|
||||
// line by gently stepping onto this line
|
||||
for (int i = 1; i <= height; i++) {
|
||||
point.y--;
|
||||
int32 offset = OffsetAt(point);
|
||||
if (offset < fCaretOffset || i == height) {
|
||||
fCaretOffset = offset;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (shiftDown && fCaretOffset != lastClickOffset) {
|
||||
if (fCaretOffset < fSelStart) {
|
||||
// extend selection to the top
|
||||
|
Loading…
Reference in New Issue
Block a user