diff --git a/src/Spectre.Console/Prompts/List/ListPrompt.cs b/src/Spectre.Console/Prompts/List/ListPrompt.cs index f30f4d348..5db80c2d2 100644 --- a/src/Spectre.Console/Prompts/List/ListPrompt.cs +++ b/src/Spectre.Console/Prompts/List/ListPrompt.cs @@ -89,10 +89,10 @@ private IRenderable BuildRenderable(ListPromptState state) skip = Math.Max(0, state.Index - middleOfList); take = Math.Min(pageSize, state.ItemCount - skip); - if (state.ItemCount - state.Index < middleOfList) + if (take < pageSize) { - // Pointer should be below the end of the list - var diff = middleOfList - (state.ItemCount - state.Index); + // Pointer should be below the middle of the (visual) list + var diff = pageSize - take; skip -= diff; take += diff; cursorIndex = middleOfList + diff;