* 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:
@@ -3124,6 +3124,8 @@ BTextView::_InitObject(BRect textRect, const BFont *initialFont,
|
|||||||
|
|
||||||
fLayoutData = new LayoutData;
|
fLayoutData = new LayoutData;
|
||||||
fLayoutData->UpdateInsets(Bounds().OffsetToCopy(B_ORIGIN), fTextRect);
|
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);
|
InsertText(inText, inLength, inOffset, inRuns);
|
||||||
|
|
||||||
// offset the caret/selection, if the text was inserted before it
|
// offset the caret/selection, if the text was inserted before it
|
||||||
if (inOffset < fSelEnd) {
|
if (inOffset <= fSelEnd) {
|
||||||
fSelStart += inLength;
|
fSelStart += inLength;
|
||||||
fClickOffset = fSelEnd = fSelStart;
|
fClickOffset = fSelEnd = fSelStart;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user