diff options
Diffstat (limited to 'src/Document.cxx')
-rw-r--r-- | src/Document.cxx | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/Document.cxx b/src/Document.cxx index 8baa84ad8..eae055dc2 100644 --- a/src/Document.cxx +++ b/src/Document.cxx @@ -1142,9 +1142,7 @@ static constexpr bool IsSpaceOrTab(int ch) noexcept { // 2) Break before punctuation // 3) Break after whole character -int Document::SafeSegment(const char *text, int length, int lengthSegment) const noexcept { - if (length <= lengthSegment) - return length; +int Document::SafeSegment(const char *text, int lengthSegment) const noexcept { int lastSpaceBreak = -1; int lastPunctuationBreak = -1; int lastEncodingAllowedBreak = 0; |