diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-03-28 22:01:48 +0300 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-03-28 22:01:48 +0300 |
commit | 5aaa0e98454b30c1a4717707d306507754da770a (patch) | |
tree | 0759d8c6c4898b63c08188ad807c366e339a0868 /src/ui/text.c | |
parent | 4f77a00aec3737965aa2d2d10fd51842a45fc45d (diff) |
Text: Word wrapping and whitespace
When wrapping, continue after whitespace.
Diffstat (limited to 'src/ui/text.c')
-rw-r--r-- | src/ui/text.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ui/text.c b/src/ui/text.c index 244934b4..b581aee3 100644 --- a/src/ui/text.c +++ b/src/ui/text.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* Copyright 2020 Jaakko Keränen <jaakko.keranen@iki.fi> | 1 | /* Copyright 2020 Jaakko Keränen <jaakko.keranen@iki.fi> |
2 | 2 | ||
3 | Redistribution and use in source and binary forms, with or without | 3 | Redistribution and use in source and binary forms, with or without |
4 | modification, are permitted provided that the following conditions are met: | 4 | modification, are permitted provided that the following conditions are met: |
@@ -1003,7 +1003,7 @@ static iRect run_Font_(iFont *d, const iRunArgs *args) { | |||
1003 | if (args->xposLimit > 0 && x2 > args->xposLimit) { | 1003 | if (args->xposLimit > 0 && x2 > args->xposLimit) { |
1004 | if (args->continueFrom_out) { | 1004 | if (args->continueFrom_out) { |
1005 | if (lastWordEnd != args->text.start && ~mode & noWrapFlag_RunMode) { | 1005 | if (lastWordEnd != args->text.start && ~mode & noWrapFlag_RunMode) { |
1006 | *args->continueFrom_out = lastWordEnd; | 1006 | *args->continueFrom_out = skipSpace_CStr(lastWordEnd); |
1007 | } | 1007 | } |
1008 | else { | 1008 | else { |
1009 | *args->continueFrom_out = currentPos; /* forced break */ | 1009 | *args->continueFrom_out = currentPos; /* forced break */ |