mirror of
https://github.com/spectreconsole/spectre.console.git
synced 2026-01-02 01:03:32 +01:00
Fix rendering bug when splitting lines
The bug might occur if there are wide characters such as emojis at the end of a line. The SplitLines method mixed cell width and text length, which might give incorrect results. This commit makes sure that comparison and calculation is done using cell width where it's appropriate.
This commit is contained in:
@@ -57,7 +57,7 @@ namespace Spectre.Console.Internal
|
||||
return;
|
||||
}
|
||||
|
||||
var width = Segment.CellLength(context, segments);
|
||||
var width = Segment.CellCount(context, segments);
|
||||
if (width >= maxWidth)
|
||||
{
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user