mirror of
https://github.com/Maks1mS/bubbles.git
synced 2024-12-25 07:04:37 +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 {
|
if len(m.lines) > 0 {
|
||||||
top := max(0, m.YOffset+m.Height-n)
|
top := max(m.YOffset+m.Height-n, 0)
|
||||||
bottom := min(len(m.lines)-1, m.YOffset+m.Height)
|
bottom := min(m.YOffset+m.Height, len(m.lines)-1)
|
||||||
lines = m.lines[top:bottom]
|
lines = m.lines[top:bottom]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user