mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-10-06 14:06:32 -04:00
ViewSelectionController owned the focused main view's line navigation (up/down move the selection or scroll, page up/down, goto top/bottom). It was extracted long ago in case other scrollable views (e.g. a focused command log) would reuse it, but none ever did — it's only attached to Normal and NormalSecondary, the two focused main views MainViewController already controls. Keeping the navigation in a separate controller is now in the way: the next change makes up/down hunk-aware (move by hunk when hunk-select mode is on), which needs the selection mode that lives in MainViewController. Rather than teach the generic-looking ViewSelectionController about that mode, fold its bindings and handlers into MainViewController and delete it. Behavior-preserving. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>