From 746ac3c29cad01f99f19c58e66dff4a02819704a Mon Sep 17 00:00:00 2001 From: T Date: Tue, 2 Sep 2025 12:22:31 -0600 Subject: history pane: reset selection indices on filter criteria changes --- internal/tui/history_box.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'internal/tui/history_box.go') diff --git a/internal/tui/history_box.go b/internal/tui/history_box.go index 6856a63..760926e 100644 --- a/internal/tui/history_box.go +++ b/internal/tui/history_box.go @@ -543,6 +543,11 @@ func (m *HistoryBoxModel) recheckBounds() { } } +func (m *HistoryBoxModel) resetSelection() { + m.summarySelection = 0 + m.detailSelection = 0 +} + // formatFilterInfo formats the filter criteria line showing client/project, time range, and total duration func (m HistoryBoxModel) formatFilterInfo(clients []queries.Client, projects map[int64][]queries.Project, timer TimerBoxModel) string { var parts []string -- cgit v1.2.3