mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-11 12:25:47 +02: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:
parent
527a1596f3
commit
125d4fa9dc
3 changed files with 9 additions and 8 deletions
|
@ -83,9 +83,9 @@ func (self *ListController) handleLineChange(change int) error {
|
|||
// we're not constantly re-rendering the main view.
|
||||
if before != after {
|
||||
if change == -1 {
|
||||
checkScrollUp(self.context.GetViewTrait(), self.c.UserConfig.Gui.ScrollOffMargin, before, after)
|
||||
checkScrollUp(self.context.GetViewTrait(), self.c.UserConfig, before, after)
|
||||
} else if change == 1 {
|
||||
checkScrollDown(self.context.GetViewTrait(), self.c.UserConfig.Gui.ScrollOffMargin, before, after)
|
||||
checkScrollDown(self.context.GetViewTrait(), self.c.UserConfig, before, after)
|
||||
}
|
||||
|
||||
return self.context.HandleFocus(types.OnFocusOpts{})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue