diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2022-01-30 13:20:43 +0200 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2022-01-30 13:20:43 +0200 |
commit | a2fe997be37611fe1cb263b3962c55564a5dd2f0 (patch) | |
tree | 5eddf157e8c1f4905b74bddb679025830162ab1a | |
parent | e9cca232c85400f4963ab221afe05c686594cda7 (diff) |
Text: Break words at backslashes
-rw-r--r-- | res/about/version.gmi | 1 | ||||
-rw-r--r-- | src/ui/text.c | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/res/about/version.gmi b/res/about/version.gmi index 5dad2c58..559bd365 100644 --- a/res/about/version.gmi +++ b/res/about/version.gmi | |||
@@ -16,6 +16,7 @@ | |||
16 | * Fixed crash when a line contains nothing but an ANSI escape sequence. | 16 | * Fixed crash when a line contains nothing but an ANSI escape sequence. |
17 | * Fixed a possible crash when saving state of subscribed feeds. | 17 | * Fixed a possible crash when saving state of subscribed feeds. |
18 | * Fixed the right-hand sidebar handling the U and Shift+U key events if it was showing the Feeds tab, even though the sidebar was hidden. | 18 | * Fixed the right-hand sidebar handling the U and Shift+U key events if it was showing the Feeds tab, even though the sidebar was hidden. |
19 | * Fixed line wrapping at backslashes. They are now considered word-breaking characters. | ||
19 | 20 | ||
20 | ## 1.10.2 | 21 | ## 1.10.2 |
21 | * Fixed cancelling an input query. Now pressing Cancel will navigate back to the previous page as intended. | 22 | * Fixed cancelling an input query. Now pressing Cancel will navigate back to the previous page as intended. |
diff --git a/src/ui/text.c b/src/ui/text.c index 7bb418eb..66231348 100644 --- a/src/ui/text.c +++ b/src/ui/text.c | |||
@@ -1559,7 +1559,7 @@ static iRect run_Font_(iFont *d, const iRunArgs *args) { | |||
1559 | iAssert(xAdvance >= 0); | 1559 | iAssert(xAdvance >= 0); |
1560 | if (wrapMode == word_WrapTextMode) { | 1560 | if (wrapMode == word_WrapTextMode) { |
1561 | /* When word wrapping, only consider certain places breakable. */ | 1561 | /* When word wrapping, only consider certain places breakable. */ |
1562 | if ((prevCh == '-' || prevCh == '/') && !isPunct_Char(ch)) { | 1562 | if ((prevCh == '-' || prevCh == '/' || prevCh == '\\') && !isPunct_Char(ch)) { |
1563 | safeBreakPos = logPos; | 1563 | safeBreakPos = logPos; |
1564 | breakAdvance = wrapAdvance; | 1564 | breakAdvance = wrapAdvance; |
1565 | breakRunIndex = runIndex; | 1565 | breakRunIndex = runIndex; |