-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix segmentation on CJK characters when updating selection
- Loading branch information
Showing
3 changed files
with
90 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
diff --git a/crengine/src/lvtinydom.cpp b/crengine/src/lvtinydom.cpp | ||
index fe2b879..df50386 100755 | ||
--- a/crengine/src/lvtinydom.cpp | ||
+++ b/crengine/src/lvtinydom.cpp | ||
@@ -6874,6 +6874,10 @@ public: | ||
_list.add( ldomWord( node, beginOfWord, i ) ); | ||
beginOfWord = -1; | ||
} | ||
+ if (lGetCharProps(text[i]) == CH_PROP_CJK) { | ||
+ _list.add( ldomWord( node, i, i+1 ) ); | ||
+ beginOfWord = -1; | ||
+ } | ||
} | ||
} | ||
/// called for each found node in range |