mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2025-12-30 17:57:57 +01:00
Fixing bug in EnsuresVisibilitySelectedItem on ListView.
This commit is contained in:
@@ -679,9 +679,10 @@ namespace Terminal.Gui {
|
||||
|
||||
void EnsuresVisibilitySelectedItem ()
|
||||
{
|
||||
SuperView?.LayoutSubviews ();
|
||||
if (selected < top) {
|
||||
top = selected;
|
||||
} else if (selected >= top + Frame.Height) {
|
||||
} else if (Frame.Height > 0 && selected >= top + Frame.Height) {
|
||||
top = Math.Max (selected - Frame.Height + 2, 0);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user