Previous revision break all sorts of stuff. Fixed. hopefully
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23837 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
a32a4683ff
commit
13bba42efc
|
@ -3056,7 +3056,7 @@ BTextView::_HandleAlphaKey(const char *bytes, int32 numBytes)
|
||||||
} else
|
} else
|
||||||
_DoInsertText(bytes, numBytes, fSelStart, NULL, NULL);
|
_DoInsertText(bytes, numBytes, fSelStart, NULL, NULL);
|
||||||
|
|
||||||
fSelStart = fSelEnd = fClickOffset = fSelStart + numBytes;
|
fClickOffset = fSelEnd;
|
||||||
|
|
||||||
ScrollToOffset(fClickOffset);
|
ScrollToOffset(fClickOffset);
|
||||||
}
|
}
|
||||||
|
@ -3481,12 +3481,9 @@ BTextView::_DoInsertText(const char *inText, int32 inLength, int32 inOffset,
|
||||||
if (TextLength() + inLength > MaxBytes())
|
if (TextLength() + inLength > MaxBytes())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (fSelStart != fSelEnd
|
if (fSelStart != fSelEnd)
|
||||||
&& fSelStart != 0
|
|
||||||
&& fSelEnd != 0) {
|
|
||||||
|
|
||||||
Select(fSelStart, fSelStart);
|
Select(fSelStart, fSelStart);
|
||||||
}
|
|
||||||
// Don't do any check, the public methods will have adjusted
|
// Don't do any check, the public methods will have adjusted
|
||||||
// eventual bogus values...
|
// eventual bogus values...
|
||||||
|
|
||||||
|
@ -3496,6 +3493,11 @@ BTextView::_DoInsertText(const char *inText, int32 inLength, int32 inOffset,
|
||||||
|
|
||||||
// copy data into buffer
|
// copy data into buffer
|
||||||
InsertText(inText, inLength, inOffset, inRuns);
|
InsertText(inText, inLength, inOffset, inRuns);
|
||||||
|
|
||||||
|
// offset the caret/selection
|
||||||
|
//int32 saveStart = fSelStart;
|
||||||
|
fSelStart += inLength;
|
||||||
|
fSelEnd += inLength;
|
||||||
|
|
||||||
// recalc line breaks and draw the text
|
// recalc line breaks and draw the text
|
||||||
_Refresh(inOffset, textLength, true, false);
|
_Refresh(inOffset, textLength, true, false);
|
||||||
|
|
Loading…
Reference in New Issue