tiv1: fix deleting first character (#7716)

This commit is contained in:
Sungyoon Cho 2024-09-09 17:58:44 +09:00 committed by GitHub
parent 7c4c402bd7
commit e1448732b3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -264,7 +264,7 @@ void CTextInput::updateIMEState(SP<CInputMethodV2> ime) {
INPUT->preeditStyling(0, std::string(ime->current.preeditString.string).length(), ZWP_TEXT_INPUT_V1_PREEDIT_STYLE_HIGHLIGHT); INPUT->preeditStyling(0, std::string(ime->current.preeditString.string).length(), ZWP_TEXT_INPUT_V1_PREEDIT_STYLE_HIGHLIGHT);
INPUT->preeditString(pV1Input->serial, ime->current.preeditString.string.c_str(), ""); INPUT->preeditString(pV1Input->serial, ime->current.preeditString.string.c_str(), "");
} else { } else {
INPUT->preeditCursor(ime->current.preeditString.begin); INPUT->preeditCursor(0);
INPUT->preeditStyling(0, 0, ZWP_TEXT_INPUT_V1_PREEDIT_STYLE_HIGHLIGHT); INPUT->preeditStyling(0, 0, ZWP_TEXT_INPUT_V1_PREEDIT_STYLE_HIGHLIGHT);
INPUT->preeditString(pV1Input->serial, "", ""); INPUT->preeditString(pV1Input->serial, "", "");
} }