From 1b803786b82ffecf8cd0691ea4605dac8246ed68 Mon Sep 17 00:00:00 2001 From: Chen Asraf Date: Mon, 9 Feb 2026 23:03:06 +0200 Subject: [PATCH] fix: pgup/pgdown scroll --- internal/fzf/fzf.go | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/internal/fzf/fzf.go b/internal/fzf/fzf.go index 6d2b580..d66bd7b 100644 --- a/internal/fzf/fzf.go +++ b/internal/fzf/fzf.go @@ -111,6 +111,30 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) { } return m, nil + case tea.KeyPgUp: + half := (m.height - 1) / 2 + if half < 1 { + half = 1 + } + m.cursor += half + if m.cursor >= len(m.filtered) { + m.cursor = len(m.filtered) - 1 + } + m.clampScroll() + return m, nil + + case tea.KeyPgDown: + half := (m.height - 1) / 2 + if half < 1 { + half = 1 + } + m.cursor -= half + if m.cursor < 0 { + m.cursor = 0 + } + m.clampScroll() + return m, nil + case tea.KeyRunes: m.query += string(msg.Runes) m.refilter()