1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-31 14:24:25 +03:00

Pass UserConfig to checkScrollUp/Down instead of just the scrollOffMargin

This will allow us to add a scrollOffEnabled config and have the functions
respect it without changes to clients.
This commit is contained in:
Stefan Haller
2023-08-17 16:27:38 +02:00
parent 527a1596f3
commit 125d4fa9dc
3 changed files with 9 additions and 8 deletions

View File

@ -164,7 +164,7 @@ func (self *PatchExplorerController) HandlePrevLine() error {
after := self.context.GetState().GetSelectedLineIdx()
if self.context.GetState().SelectingLine() {
checkScrollUp(self.context.GetViewTrait(), self.c.UserConfig.Gui.ScrollOffMargin, before, after)
checkScrollUp(self.context.GetViewTrait(), self.c.UserConfig, before, after)
}
return nil
@ -176,7 +176,7 @@ func (self *PatchExplorerController) HandleNextLine() error {
after := self.context.GetState().GetSelectedLineIdx()
if self.context.GetState().SelectingLine() {
checkScrollDown(self.context.GetViewTrait(), self.c.UserConfig.Gui.ScrollOffMargin, before, after)
checkScrollDown(self.context.GetViewTrait(), self.c.UserConfig, before, after)
}
return nil