From 940901b615846b8456b78fedce25cdf8b222ecfc Mon Sep 17 00:00:00 2001 From: Oliver Tappe Date: Mon, 6 Apr 2009 22:27:01 +0000 Subject: [PATCH] applied two textview-patches from Blub that fixes #3458: * Select() did not re-show the caret when it should * GoToLine() must hide/show the caret to avoid drawing artefacts git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29983 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/interface/TextView.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/kits/interface/TextView.cpp b/src/kits/interface/TextView.cpp index f7d2952988..8f39e5dc86 100644 --- a/src/kits/interface/TextView.cpp +++ b/src/kits/interface/TextView.cpp @@ -1331,7 +1331,9 @@ void BTextView::GoToLine(int32 index) { _CancelInputMethod(); + _HideCaret(); fSelStart = fSelEnd = fClickOffset = OffsetAt(index); + _ShowCaret(); } @@ -1507,6 +1509,7 @@ BTextView::Select(int32 startOffset, int32 endOffset) Highlight(fSelStart, fSelEnd); } fSelStart = fSelEnd = fClickOffset = startOffset; + _ShowCaret(); } else { if (fActive) { // draw only those ranges that are different