* 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
This commit is contained in:
Oliver Tappe 2009-04-07 15:52:58 +00:00
parent 3f3ab1625c
commit ed5f1fd367

View File

@ -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;
}