Fixed a regression pointed out by Rene:

* Select() did not adjust fClickOffset, which resulted in the cursor
  position not being where on would expect (noticable when pressing
  cursor-up/-down)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30184 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Oliver Tappe
2009-04-15 22:02:16 +00:00
parent 0af6bceba4
commit ed4f2d8805
+2 -2
View File
@@ -1537,7 +1537,7 @@ BTextView::Select(int32 startOffset, int32 endOffset)
Highlight(start, end);
}
}
fSelStart = startOffset;
fSelStart = fClickOffset = startOffset;
fSelEnd = endOffset;
}
}
@@ -4622,7 +4622,7 @@ BTextView::_PerformAutoScrolling()
// TODO: Refine this, I can't even remember how beos works here
scrollBy.y = lineHeight > 0 ? lineHeight * (int32)(floorf(vertDiff)
/ lineHeight) : 0;
// prevent from scrolling out of view
if (scrollBy.y != 0.0) {
float bottomMax = floorf(fTextRect.bottom