From ed4f2d880548b5a11e7b3d55a36f53648bb62ed5 Mon Sep 17 00:00:00 2001 From: Oliver Tappe Date: Wed, 15 Apr 2009 22:02:16 +0000 Subject: [PATCH] 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 --- src/kits/interface/TextView.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/kits/interface/TextView.cpp b/src/kits/interface/TextView.cpp index 054619388a..3edc2d1e99 100644 --- a/src/kits/interface/TextView.cpp +++ b/src/kits/interface/TextView.cpp @@ -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