mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-11 04:15:48 +02: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:
parent
996e30e5d9
commit
061bfce835
17 changed files with 38 additions and 38 deletions
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue