mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-30 03:23:08 +03:00
Change length parameter of getDisplayStrings to endIdx
It's more natural to work with this way, as we will see later in this branch.
This commit is contained in:
@ -12,7 +12,7 @@ type ListContextTrait struct {
|
||||
|
||||
c *ContextCommon
|
||||
list types.IList
|
||||
getDisplayStrings func(startIdx int, length int) [][]string
|
||||
getDisplayStrings func(startIdx int, endIdx int) [][]string
|
||||
// Alignment for each column. If nil, the default is left alignment
|
||||
getColumnAlignments func() []utils.Alignment
|
||||
// Some contexts, like the commit context, will highlight the path from the selected commit
|
||||
@ -59,7 +59,7 @@ func (self *ListContextTrait) FocusLine() {
|
||||
|
||||
func (self *ListContextTrait) refreshViewport() {
|
||||
startIdx, length := self.GetViewTrait().ViewPortYBounds()
|
||||
displayStrings := self.getDisplayStrings(startIdx, length)
|
||||
displayStrings := self.getDisplayStrings(startIdx, startIdx+length)
|
||||
content := utils.RenderDisplayStrings(displayStrings, nil)
|
||||
self.GetViewTrait().SetViewPortContent(content)
|
||||
}
|
||||
|
Reference in New Issue
Block a user