Skip to content

Extract Engine::picker_scroll(delta) from backend scroll handlers #380

Description

@JDonaghy

Problem

Both backends directly manipulate engine.picker_selected and engine.picker_scroll_top with manual clamping, then call engine.picker_load_preview():

  • GTK: mod.rs:4471-4489, ~19 lines
  • TUI: mouse.rs:617-868, ~30 lines of scroll logic (within a larger picker block)

Proposed fix

Add Engine::picker_scroll(delta: isize) that handles selection movement, scroll offset clamping, and preview loading in one call.

Context

Identified in Session 370 backend dedup audit.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions