Update patch for fcitx: Fix build of Utf8SubString
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@debian.org>
Nobuhiro Iwamatsu
3 years ago
15 | 15 |
* protobuf_generated_classes_no_inheritance.patch
|
16 | 16 |
* Update 0001-Update-uim-mozc-to-c979f127acaeb7b35d3344e8b1e40848e.patch
|
17 | 17 |
* Fix build with latest mozc.
|
|
18 |
* Update 0002-Support-fcitx.patch
|
|
19 |
* Fix build of Utf8SubString for fcitx.
|
18 | 20 |
|
19 | 21 |
-- Nobuhiro Iwamatsu <iwamatsu@debian.org> Sun, 27 Dec 2020 22:01:58 +0900
|
20 | 22 |
|
4716 | 4716 |
+
|
4717 | 4717 |
+ const size_t selection_start = std::min(cursor_pos, anchor_pos);
|
4718 | 4718 |
+ const size_t selection_length = std::abs(info->relative_selected_length);
|
4719 | |
+ info->preceding_text = Util::Utf8SubString(surrounding_text, 0, selection_start);
|
4720 | |
+ info->selection_text = Util::Utf8SubString(surrounding_text, selection_start, selection_length);
|
4721 | |
+ info->following_text = Util::Utf8SubString(surrounding_text, selection_start + selection_length);
|
|
4719 |
+ info->preceding_text = std::string(Util::Utf8SubString(surrounding_text, 0, selection_start));
|
|
4720 |
+ info->selection_text = std::string(Util::Utf8SubString(surrounding_text, selection_start, selection_length));
|
|
4721 |
+ info->following_text = std::string(Util::Utf8SubString(surrounding_text, selection_start + selection_length));
|
4722 | 4722 |
+ return true;
|
4723 | 4723 |
+}
|
4724 | 4724 |
+
|