diff options
author | Erik Kundiman <erik@megapahit.org> | 2024-02-22 08:38:12 +0800 |
---|---|---|
committer | Erik Kundiman <erik@megapahit.org> | 2024-02-22 08:38:12 +0800 |
commit | 60592ae0d7a98e071e516fcac70c5bf1427f20be (patch) | |
tree | 270a0d44f14634f7519ba222bee6203d7ed4c6e8 /indra/llui/lltexteditor.cpp | |
parent | 15e0231006838044b0315c19ed6a1b67a1da8e75 (diff) |
IME composition is now replaced by the result
instead of being printed alongside.
For now, it always gets reset from the start after pressing Return,
which is to be fixed next.
Diffstat (limited to 'indra/llui/lltexteditor.cpp')
-rw-r--r-- | indra/llui/lltexteditor.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp index 299af0dec8..d81009246f 100644 --- a/indra/llui/lltexteditor.cpp +++ b/indra/llui/lltexteditor.cpp @@ -1202,7 +1202,7 @@ void LLTextEditor::addChar(llwchar wc) } } -void LLTextEditor::addString(char *str) +void LLTextEditor::addString(char *str, bool editing) { if (!getEnabled()) return; @@ -1210,6 +1210,10 @@ void LLTextEditor::addString(char *str) deleteSelection(TRUE); else if (LL_KIM_OVERWRITE == gKeyboard->getInsertMode()) removeChar(mCursorPos); + else if (editing) { + clear(); + setCursorPos(0); + } setCursorPos(mCursorPos + addString(mCursorPos, str)); @@ -1948,12 +1952,12 @@ BOOL LLTextEditor::handleUnicodeCharHere(llwchar uni_char) return handled; } -BOOL LLTextEditor::handleUnicodeStringHere(char *uni_str) +BOOL LLTextEditor::handleUnicodeStringHere(char *uni_str, bool editing) { auto handled = FALSE; if (!mReadOnly) { - addString(uni_str); + addString(uni_str, editing); getWindow()->hideCursorUntilMouseMove(); handled = TRUE; } |