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:
@ -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
|
||||
|
Reference in New Issue
Block a user