Merge pull request #87 from pmsanford/master

Fix bug in ListView that caused it to render spaces off the window
This commit is contained in:
Miguel de Icaza
2018-05-15 22:48:50 -04:00
committed by GitHub

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);
}
}
}