Fix bug in ListView that caused it to render spaces off the window

This commit is contained in:
Paul Sanford
2018-05-15 14:36:03 -07:00
parent 92d35cde97
commit 2f1336a2bf

View File

@@ -299,11 +299,14 @@ namespace Terminal.Gui {
Driver.SetAttribute (newcolor);
current = newcolor;
}
if (item >= source.Count)
if (item >= source.Count) {
Move(0, row);
for (int c = 0; c < f.Width; c++)
Driver.AddRune (' ');
else
Source.Render (isSelected, item, 0, row, f.Width);
Driver.AddRune(' ');
} else {
Source.Render(isSelected, item, 0, row, f.Width);
}
}
}