From 5aaa0e98454b30c1a4717707d306507754da770a Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Sun, 28 Mar 2021 22:01:48 +0300 Subject: Text: Word wrapping and whitespace When wrapping, continue after whitespace. --- src/ui/text.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/ui') 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 @@ -/* Copyright 2020 Jaakko Keränen +/* Copyright 2020 Jaakko Keränen Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -1003,7 +1003,7 @@ static iRect run_Font_(iFont *d, const iRunArgs *args) { if (args->xposLimit > 0 && x2 > args->xposLimit) { if (args->continueFrom_out) { if (lastWordEnd != args->text.start && ~mode & noWrapFlag_RunMode) { - *args->continueFrom_out = lastWordEnd; + *args->continueFrom_out = skipSpace_CStr(lastWordEnd); } else { *args->continueFrom_out = currentPos; /* forced break */ -- cgit v1.2.3