From 51a65683a3fa1a274dd1adcc37faa6f47c83418f Mon Sep 17 00:00:00 2001 From: GoranKovac Date: Sat, 2 May 2026 11:05:08 +0200 Subject: [PATCH] Account current page for mouse motion Mouse motion does not account page number so it always returns to first index on first page no matter what current page it currently is. Fixes https://github.com/savedra1/clipse/issues/363 --- app/update.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/update.go b/app/update.go index d9ce964..6cbde92 100644 --- a/app/update.go +++ b/app/update.go @@ -365,7 +365,11 @@ func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) { if msg.Y >= listItemsStart { relativeY := msg.Y - listItemsStart - hoveredIndex := relativeY / linesPerItem + indexOnPage := relativeY / linesPerItem + + page := m.list.Paginator.Page + perPage := m.list.Paginator.PerPage + hoveredIndex := page*perPage + indexOnPage if hoveredIndex < len(m.list.Items()) { if m.showConfirmation {