mirror of
https://github.com/Maks1mS/bubbles.git
synced 2024-12-24 14:44:38 +03:00
Be more consistent with max() argument order
This commit is contained in:
parent
5720cfb35a
commit
2f909886c1
@ -168,8 +168,8 @@ func (m *Model) LineDown(n int) (lines []string) {
|
||||
)
|
||||
|
||||
if len(m.lines) > 0 {
|
||||
top := max(0, m.YOffset+m.Height-n)
|
||||
bottom := min(len(m.lines)-1, m.YOffset+m.Height)
|
||||
top := max(m.YOffset+m.Height-n, 0)
|
||||
bottom := min(m.YOffset+m.Height, len(m.lines)-1)
|
||||
lines = m.lines[top:bottom]
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user