1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-30 03:23:08 +03:00

Remove return value of HandleRender

This commit is contained in:
Stefan Haller
2024-09-04 13:17:33 +02:00
parent 5659f1f3e9
commit b91beb68e1
14 changed files with 25 additions and 40 deletions

View File

@ -49,7 +49,7 @@ func (self *ListContextTrait) FocusLine() {
} else if self.renderOnlyVisibleLines {
newOrigin, _ := self.GetViewTrait().ViewPortYBounds()
if oldOrigin != newOrigin {
return self.HandleRender()
self.HandleRender()
}
}
return nil
@ -91,7 +91,7 @@ func (self *ListContextTrait) HandleFocusLost(opts types.OnFocusLostOpts) error
}
// OnFocus assumes that the content of the context has already been rendered to the view. OnRender is the function which actually renders the content to the view
func (self *ListContextTrait) HandleRender() error {
func (self *ListContextTrait) HandleRender() {
self.list.ClampSelection()
if self.renderOnlyVisibleLines {
// Rendering only the visible area can save a lot of cell memory for
@ -110,8 +110,6 @@ func (self *ListContextTrait) HandleRender() error {
}
self.c.Render()
self.setFooter()
return nil
}
func (self *ListContextTrait) OnSearchSelect(selectedLineIdx int) error {