From 83a80624c48cd07af40fdacb301975a51b01b795 Mon Sep 17 00:00:00 2001 From: Boram Bae Date: Thu, 15 Apr 2021 17:14:34 +0900 Subject: [PATCH] Fix a preedit text bug (#64) * The return value of TextInputModel::selection is not a reference Signed-off-by: Boram Bae --- shell/platform/tizen/channels/text_input_channel.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/shell/platform/tizen/channels/text_input_channel.cc b/shell/platform/tizen/channels/text_input_channel.cc index 9cc41dda502fc..5692ba3726356 100644 --- a/shell/platform/tizen/channels/text_input_channel.cc +++ b/shell/platform/tizen/channels/text_input_channel.cc @@ -597,10 +597,9 @@ void TextInputChannel::OnPreedit(std::string str, int cursor_pos) { have_preedit_ = false; if (edit_status_ == EditStatus::kPreeditStart) { - TextRange selection = active_model_->selection(); - preedit_start_pos_ = selection.base(); + preedit_start_pos_ = active_model_->selection().base(); active_model_->AddText(str); - preedit_end_pos_ = selection.base(); + preedit_end_pos_ = active_model_->selection().base(); have_preedit_ = true; SendStateUpdate(*active_model_); FT_LOGD("preedit start pos[%d], preedit end pos[%d]", preedit_start_pos_,