1
0
mirror of https://github.com/bcicen/ctop.git synced 2024-08-30 18:23:19 +00:00

combine conditionals

This commit is contained in:
Bradley Cicenas 2018-02-01 16:55:23 +00:00
parent 10b9a6c013
commit 44a54e070d

View File

@ -23,10 +23,7 @@ func NewCompactGrid() *CompactGrid {
func (cg *CompactGrid) Align() {
y := cg.Y
if cg.Offset >= len(cg.Rows) {
cg.Offset = 0
}
if cg.Offset < 0 {
if cg.Offset >= len(cg.Rows) || cg.Offset < 0 {
cg.Offset = 0
}