@@ -245,7 +245,7 @@ func (f *filterableList[T]) Filter(query string) tea.Cmd {
245245
246246 f.selectedItemIdx = -1
247247 if query == "" || len(f.items) == 0 {
248− return f.list.SetItems(f.items)
248+ return f.list.SetItems(f.visibleItems(f.items))
249249 }
250250
251251 matches := fuzzy.FindFrom(query, f)
@@ -274,7 +274,7 @@ func (f *filterableList[T]) Filter(query string) tea.Cmd {
274274
275275func (f *filterableList[T]) SetItems(items []T) tea.Cmd {
276276 f.items = items
277− return f.list.SetItems(items)
277+ return f.list.SetItems(f.visibleItems(items))
278278}
279279
280280func (f *filterableList[T]) Cursor() *tea.Cursor {
@@ -317,3 +317,13 @@ func (f *filterableList[T]) String(i int) string {
317317func (f *filterableList[T]) Len() int {
318318 return len(f.items)
319319}
320+
321+// visibleItems returns the subset of items that should be rendered based on
322+// the configured resultsSize limit. The underlying source (f.items) remains
323+// intact so filtering still searches the full set.
324+func (f *filterableList[T]) visibleItems(items []T) []T {
325+ if f.resultsSize > 0 && len(items) > f.resultsSize {
326+ return items[:f.resultsSize]
327+ }
328+ return items
329+}