Fix #6458 - crash in BTextView when entering Japanese characters
* when I changed InsertText() to adjust the caret position recently, I forgot to drop that adjustment from all callers - _HandleInputMethodChanged() was still doing it, leading to out of bounds access git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38243 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -5401,8 +5401,6 @@ BTextView::_HandleInputMethodChanged(BMessage *message)
|
|||||||
|
|
||||||
const int32 inlineOffset = fInline->Offset();
|
const int32 inlineOffset = fInline->Offset();
|
||||||
InsertText(string, stringLen, fSelStart, NULL);
|
InsertText(string, stringLen, fSelStart, NULL);
|
||||||
fSelStart += stringLen;
|
|
||||||
fCaretOffset = fSelEnd = fSelStart;
|
|
||||||
|
|
||||||
_Refresh(inlineOffset, fSelEnd, true);
|
_Refresh(inlineOffset, fSelEnd, true);
|
||||||
_ShowCaret();
|
_ShowCaret();
|
||||||
|
|||||||
Reference in New Issue
Block a user