Fix text-wrapping special case

If a line of text contained a whole word that was longer than the
allotted space, it would fail to wrap that line completely, even
if it was possible to wrap at other locations.

Fixing this uncovered a second issue, where it would drop the last
line if the input had more than one lines and one of the first ones
was wider than the specified width.
This commit is contained in:
Pavlos Touboulidis
2014-04-25 18:11:44 +03:00
parent 4f12882706
commit ef066560ad
2 changed files with 17 additions and 31 deletions

View File

@@ -149,7 +149,7 @@ namespace OpenRA
public static string JoinWith<T>(this IEnumerable<T> ts, string j)
{
return string.Join(j, ts.Select(t => t.ToString()).ToArray());
return string.Join(j, ts);
}
public static IEnumerable<T> Append<T>(this IEnumerable<T> ts, params T[] moreTs)