mirror of
https://github.com/bcicen/ctop.git
synced 2024-08-30 18:23:19 +00:00
gofmt main package
This commit is contained in:
parent
28f16c9a17
commit
47d60fe51b
13
cursor.go
13
cursor.go
@ -2,6 +2,7 @@ package main
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"math"
|
"math"
|
||||||
|
|
||||||
ui "github.com/gizak/termui"
|
ui "github.com/gizak/termui"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -139,8 +140,8 @@ func (gc *GridCursor) PgUp() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var nextidx int
|
var nextidx int
|
||||||
nextidx = int(math.Max(0.0, float64(idx - cGrid.MaxRows())))
|
nextidx = int(math.Max(0.0, float64(idx-cGrid.MaxRows())))
|
||||||
cGrid.Offset = int(math.Max(float64(cGrid.Offset - cGrid.MaxRows()),
|
cGrid.Offset = int(math.Max(float64(cGrid.Offset-cGrid.MaxRows()),
|
||||||
float64(0)))
|
float64(0)))
|
||||||
|
|
||||||
active := gc.filtered[idx]
|
active := gc.filtered[idx]
|
||||||
@ -161,10 +162,10 @@ func (gc *GridCursor) PgDown() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var nextidx int
|
var nextidx int
|
||||||
nextidx = int(math.Min(float64(gc.Len() - 1),
|
nextidx = int(math.Min(float64(gc.Len()-1),
|
||||||
float64(idx + cGrid.MaxRows())))
|
float64(idx+cGrid.MaxRows())))
|
||||||
cGrid.Offset = int(math.Min(float64(cGrid.Offset + cGrid.MaxRows()),
|
cGrid.Offset = int(math.Min(float64(cGrid.Offset+cGrid.MaxRows()),
|
||||||
float64(gc.Len() - cGrid.MaxRows())))
|
float64(gc.Len()-cGrid.MaxRows())))
|
||||||
|
|
||||||
active := gc.filtered[idx]
|
active := gc.filtered[idx]
|
||||||
next := gc.filtered[nextidx]
|
next := gc.filtered[nextidx]
|
||||||
|
Loading…
Reference in New Issue
Block a user