mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2026-01-01 16:59:35 +01:00
Fixed not rendering last character of line when text is too long (and truncated)
This commit is contained in:
@@ -1226,7 +1226,7 @@ namespace Terminal.Gui {
|
|||||||
if(lineBody.Sum(l=>Rune.ColumnWidth(l)) > availableWidth)
|
if(lineBody.Sum(l=>Rune.ColumnWidth(l)) > availableWidth)
|
||||||
{
|
{
|
||||||
// remaining space is zero and truncate the line
|
// remaining space is zero and truncate the line
|
||||||
lineBody = new string(lineBody.TakeWhile(c=>(availableWidth -= Rune.ColumnWidth(c)) > 0).ToArray());
|
lineBody = new string(lineBody.TakeWhile(c=>(availableWidth -= Rune.ColumnWidth(c)) >= 0).ToArray());
|
||||||
availableWidth = 0;
|
availableWidth = 0;
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
|||||||
Reference in New Issue
Block a user