parent
0d3bd614c7
commit
74f911be74
|
@ -3505,8 +3505,17 @@ BTextView::_HandleArrowKey(uint32 inArrowKey, bool commandKeyDown)
|
||||||
else {
|
else {
|
||||||
float height;
|
float height;
|
||||||
BPoint point = PointAt(fCaretOffset, &height);
|
BPoint point = PointAt(fCaretOffset, &height);
|
||||||
point.y -= height;
|
// find the caret position on the previous
|
||||||
fCaretOffset = OffsetAt(point);
|
// 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 (shiftDown && fCaretOffset != lastClickOffset) {
|
||||||
if (fCaretOffset < fSelStart) {
|
if (fCaretOffset < fSelStart) {
|
||||||
// extend selection to the top
|
// extend selection to the top
|
||||||
|
|
Loading…
Reference in New Issue