Update patch for fcitx5: Fix build of Utf8SubString
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@debian.org>
Nobuhiro Iwamatsu
3 years ago
17 | 17 |
* Fix build with latest mozc.
|
18 | 18 |
* Update 0002-Support-fcitx.patch
|
19 | 19 |
* Fix build of Utf8SubString for fcitx.
|
|
20 |
* Fix build of Utf8SubString for fcitx5.
|
20 | 21 |
|
21 | 22 |
-- Nobuhiro Iwamatsu <iwamatsu@debian.org> Sun, 27 Dec 2020 22:01:58 +0900
|
22 | 23 |
|
9349 | 9349 |
+ const size_t selection_start = std::min(cursor_pos, anchor_pos);
|
9350 | 9350 |
+ const size_t selection_length = std::abs(info->relative_selected_length);
|
9351 | 9351 |
+ info->preceding_text =
|
9352 | |
+ Util::Utf8SubString(surrounding_text, 0, selection_start);
|
|
9352 |
+ std::string(Util::Utf8SubString(surrounding_text, 0, selection_start));
|
9353 | 9353 |
+ info->selection_text =
|
9354 | |
+ Util::Utf8SubString(surrounding_text, selection_start, selection_length);
|
|
9354 |
+ std::string(Util::Utf8SubString(surrounding_text, selection_start, selection_length));
|
9355 | 9355 |
+ info->following_text =
|
9356 | |
+ Util::Utf8SubString(surrounding_text, selection_start + selection_length);
|
|
9356 |
+ std::string(Util::Utf8SubString(surrounding_text, selection_start + selection_length));
|
9357 | 9357 |
+ return true;
|
9358 | 9358 |
+}
|
9359 | 9359 |
+
|