Explorar el Código

Fixed not rendering last character of line when text is too long (and truncated)

tznind hace 4 años
padre
commit
74f5dd8dc5
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      Terminal.Gui/Views/TreeView.cs

+ 1 - 1
Terminal.Gui/Views/TreeView.cs

@@ -1226,7 +1226,7 @@ namespace Terminal.Gui {
 			if(lineBody.Sum(l=>Rune.ColumnWidth(l)) > availableWidth)
 			{
 				// 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;
 			}
 			else{