Skip to content

Commit 7da6abd

Browse files
committed
Update cskk version to latest
1 parent 78935a9 commit 7da6abd

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

CMakeLists.txt

+2-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ find_package(PkgConfig REQUIRED)
2121
find_package(Fcitx5Core 5.0.6 REQUIRED)
2222
find_package(Fcitx5Utils 5.0.6 REQUIRED)
2323

24-
pkg_check_modules(LIBCSKK REQUIRED IMPORTED_TARGET "cskk>=0.12.0")
24+
# GITHUB_ACTION_BUILD_CSKK_VERSION=1.0.1
25+
pkg_check_modules(LIBCSKK REQUIRED IMPORTED_TARGET "cskk>=1.0")
2526

2627
option(ENABLE_QT "Enable Qt for GUI configuration" On)
2728

bin/cskk_version.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
# Run from repository root and output cskk version from CMakeLists.txt
33
# Helper for release automation
44
set -e
5-
cat CMakeLists.txt | sed -n -e "s/pkg_check_modules(LIBCSKK REQUIRED IMPORTED_TARGET \"cskk>=\(.*\)\")/\1/p"
5+
cat CMakeLists.txt | sed -n -e "s/# GITHUB_ACTION_BUILD_CSKK_VERSION=\(.*\)/\1/p"

src/cskk.cpp

+5-4
Original file line numberDiff line numberDiff line change
@@ -510,16 +510,17 @@ FcitxCskkContext::formatPreedit(CskkStateInfoFfi *cskkStateInfoArray,
510510
cskkStateInfo.composition_selection_state_info;
511511
mainContent.append(selection_marker, TextFormatFlag::DontCommit);
512512
mainCursorIdx += selection_marker.length();
513+
std::string tmpContentString;
513514
if (compositionSelectionStateInfo.composited) {
514515
mainCursorIdx += strlen(compositionSelectionStateInfo.composited);
515-
mainContent.append(compositionSelectionStateInfo.composited,
516-
TextFormatFlag::Underline);
516+
tmpContentString.append(compositionSelectionStateInfo.composited);
517517
}
518518
if (compositionSelectionStateInfo.okuri) {
519519
mainCursorIdx += strlen(compositionSelectionStateInfo.okuri);
520-
mainContent.append(compositionSelectionStateInfo.okuri,
521-
TextFormatFlag::Underline);
520+
tmpContentString.append(compositionSelectionStateInfo.okuri);
522521
}
522+
mainContent.append(tmpContentString, TextFormatFlag::Underline);
523+
523524
if (compositionSelectionStateInfo.annotation) {
524525
supplementContent.clear();
525526
supplementContent.append(compositionSelectionStateInfo.annotation,

0 commit comments

Comments
 (0)