mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2026-01-01 08:50:25 +01:00
Fix formatting for ListView.cs changes
This commit is contained in:
@@ -450,18 +450,17 @@ namespace Terminal.Gui {
|
||||
{
|
||||
if (source.Count == 0){
|
||||
// Do we set lastSelectedItem to zero here?
|
||||
return false; //Nothing for us to move to
|
||||
}
|
||||
return false; //Nothing for us to move to
|
||||
}
|
||||
if (selected >= source.Count) {
|
||||
// If for some reason we are currently outside of the
|
||||
// valid values range, we should select the bottommost valid value.
|
||||
// This can occur if the backing data source changes.
|
||||
selected = source.Count - 1;
|
||||
selected = source.Count - 1;
|
||||
OnSelectedChanged ();
|
||||
SetNeedsDisplay ();
|
||||
} else if (selected + 1 < source.Count) { //can move by down by one.
|
||||
} else if (selected + 1 < source.Count) { //can move by down by one.
|
||||
selected++;
|
||||
|
||||
if (selected >= top + Frame.Height)
|
||||
top++;
|
||||
OnSelectedChanged ();
|
||||
@@ -482,21 +481,21 @@ namespace Terminal.Gui {
|
||||
{
|
||||
if (source.Count == 0){
|
||||
// Do we set lastSelectedItem to zero here?
|
||||
return false; //Nothing for us to move to
|
||||
}
|
||||
return false; //Nothing for us to move to
|
||||
}
|
||||
if (selected >= source.Count) {
|
||||
// If for some reason we are currently outside of the
|
||||
// valid values range, we should select the bottommost valid value.
|
||||
// This can occur if the backing data source changes.
|
||||
selected = source.Count - 1;
|
||||
selected = source.Count - 1;
|
||||
OnSelectedChanged ();
|
||||
SetNeedsDisplay ();
|
||||
} else if (selected > 0) {
|
||||
selected--;
|
||||
} else if (selected > 0) {
|
||||
selected--;
|
||||
if (selected > Source.Count) {
|
||||
selected = Source.Count - 1;
|
||||
}
|
||||
if (selected < top)
|
||||
selected = Source.Count - 1;
|
||||
}
|
||||
if (selected < top)
|
||||
top = selected;
|
||||
OnSelectedChanged ();
|
||||
SetNeedsDisplay ();
|
||||
|
||||
Reference in New Issue
Block a user