mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-30 03:23:08 +03:00
Render the view when scrolling with the wheel
This commit is contained in:
@ -136,3 +136,7 @@ func (self *ListContextTrait) IsItemVisible(item types.HasUrn) bool {
|
|||||||
func (self *ListContextTrait) RangeSelectEnabled() bool {
|
func (self *ListContextTrait) RangeSelectEnabled() bool {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (self *ListContextTrait) RenderOnlyVisibleLines() bool {
|
||||||
|
return self.renderOnlyVisibleLines
|
||||||
|
}
|
||||||
|
@ -53,6 +53,9 @@ func (self *ListController) HandleScrollRight() error {
|
|||||||
func (self *ListController) HandleScrollUp() error {
|
func (self *ListController) HandleScrollUp() error {
|
||||||
scrollHeight := self.c.UserConfig.Gui.ScrollHeight
|
scrollHeight := self.c.UserConfig.Gui.ScrollHeight
|
||||||
self.context.GetViewTrait().ScrollUp(scrollHeight)
|
self.context.GetViewTrait().ScrollUp(scrollHeight)
|
||||||
|
if self.context.RenderOnlyVisibleLines() {
|
||||||
|
return self.context.HandleRender()
|
||||||
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
@ -60,6 +63,9 @@ func (self *ListController) HandleScrollUp() error {
|
|||||||
func (self *ListController) HandleScrollDown() error {
|
func (self *ListController) HandleScrollDown() error {
|
||||||
scrollHeight := self.c.UserConfig.Gui.ScrollHeight
|
scrollHeight := self.c.UserConfig.Gui.ScrollHeight
|
||||||
self.context.GetViewTrait().ScrollDown(scrollHeight)
|
self.context.GetViewTrait().ScrollDown(scrollHeight)
|
||||||
|
if self.context.RenderOnlyVisibleLines() {
|
||||||
|
return self.context.HandleRender()
|
||||||
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
@ -153,6 +153,7 @@ type IListContext interface {
|
|||||||
FocusLine()
|
FocusLine()
|
||||||
IsListContext() // used for type switch
|
IsListContext() // used for type switch
|
||||||
RangeSelectEnabled() bool
|
RangeSelectEnabled() bool
|
||||||
|
RenderOnlyVisibleLines() bool
|
||||||
}
|
}
|
||||||
|
|
||||||
type IPatchExplorerContext interface {
|
type IPatchExplorerContext interface {
|
||||||
|
Reference in New Issue
Block a user