mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2025-12-31 02:08:03 +01:00
Prevents top to be less than zero if source count is zero.
This commit is contained in:
@@ -557,7 +557,7 @@ namespace Terminal.Gui {
|
||||
/// <returns></returns>
|
||||
public virtual bool MoveEnd ()
|
||||
{
|
||||
if (selected != source.Count - 1) {
|
||||
if (source.Count > 0 && selected != source.Count - 1) {
|
||||
selected = source.Count - 1;
|
||||
top = selected;
|
||||
OnSelectedChanged ();
|
||||
|
||||
Reference in New Issue
Block a user