From 2f1336a2bf7f84234cdf31b8b6909e5ad8928d8a Mon Sep 17 00:00:00 2001 From: Paul Sanford Date: Tue, 15 May 2018 14:36:03 -0700 Subject: [PATCH] Fix bug in ListView that caused it to render spaces off the window --- Terminal.Gui/Views/ListView.cs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Terminal.Gui/Views/ListView.cs b/Terminal.Gui/Views/ListView.cs index 39412d4c3..a28650e89 100644 --- a/Terminal.Gui/Views/ListView.cs +++ b/Terminal.Gui/Views/ListView.cs @@ -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); + } } }