gentoo-ebuilds/app-i18n/mozc/files/mozc-2.28.5029.102-abseil-20230802.0-fcitx5.patch
Yongxiang Liang 7e91c00404
app-i18n/mozc: add fcitx5 support
Closes: https://github.com/gentoo/gentoo/pull/34478
Signed-off-by: Yongxiang Liang <tanekliang@gmail.com>
Signed-off-by: Yixun Lan <dlan@gentoo.org>
2024-01-14 00:36:35 +00:00

19 lines
961 B
Diff

Adapted fcitx5 path from https://github.com/fcitx/mozc/commit/748ddfb45b7615283f1d40e03c23940750031ac1
--- a/src/unix/fcitx5/surrounding_text_util.cc
+++ b/src/unix/fcitx5/surrounding_text_util.cc
@@ -211,11 +211,11 @@
const size_t selection_start = std::min(cursor_pos, anchor_pos);
const size_t selection_length = std::abs(info->relative_selected_length);
info->preceding_text =
- Util::Utf8SubString(surrounding_text, 0, selection_start);
+ std::string(Util::Utf8SubString(surrounding_text, 0, selection_start));
info->selection_text =
- Util::Utf8SubString(surrounding_text, selection_start, selection_length);
+ std::string(Util::Utf8SubString(surrounding_text, selection_start, selection_length));
info->following_text =
- Util::Utf8SubString(surrounding_text, selection_start + selection_length);
+ std::string(Util::Utf8SubString(surrounding_text, selection_start + selection_length));
return true;
}