From ed5f1fd36793414fca50835448cc4c3b74a0789b Mon Sep 17 00:00:00 2001 From: Oliver Tappe Date: Tue, 7 Apr 2009 15:52:58 +0000 Subject: [PATCH] * fix off-by-one error in my last change that reverted the editing direction - oops ;-) * undo is now active by default git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29996 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/interface/TextView.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/kits/interface/TextView.cpp b/src/kits/interface/TextView.cpp index ef773da531..e30fe1339e 100644 --- a/src/kits/interface/TextView.cpp +++ b/src/kits/interface/TextView.cpp @@ -3124,6 +3124,8 @@ BTextView::_InitObject(BRect textRect, const BFont *initialFont, fLayoutData = new LayoutData; fLayoutData->UpdateInsets(Bounds().OffsetToCopy(B_ORIGIN), fTextRect); + + SetDoesUndo(true); } @@ -3931,7 +3933,7 @@ BTextView::_DoInsertText(const char *inText, int32 inLength, int32 inOffset, InsertText(inText, inLength, inOffset, inRuns); // offset the caret/selection, if the text was inserted before it - if (inOffset < fSelEnd) { + if (inOffset <= fSelEnd) { fSelStart += inLength; fClickOffset = fSelEnd = fSelStart; }