Update termui to fix table bug
This commit is contained in:
parent
b870d199ba
commit
1090d326e8
2
Gopkg.lock
generated
2
Gopkg.lock
generated
@ -17,7 +17,7 @@
|
||||
branch = "master"
|
||||
name = "github.com/cjbassi/termui"
|
||||
packages = ["."]
|
||||
revision = "b7a9b813b6a3bb09604fe10853cfd437291f20a1"
|
||||
revision = "f1b2f22c3713217ceeb39b297418fabce7bb7e6e"
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
|
6
vendor/github.com/cjbassi/termui/table.go
generated
vendored
6
vendor/github.com/cjbassi/termui/table.go
generated
vendored
@ -58,9 +58,9 @@ func (self *Table) Buffer() *Buffer {
|
||||
buf := self.Block.Buffer()
|
||||
|
||||
// removes gap at the bottom of the current view if there is one
|
||||
if self.TopRow > len(self.Rows)-(self.Y-1) {
|
||||
self.TopRow = len(self.Rows) - (self.Y - 1)
|
||||
}
|
||||
// if self.TopRow > len(self.Rows)-(self.Y-1) {
|
||||
// self.TopRow = len(self.Rows) - (self.Y - 1)
|
||||
// }
|
||||
|
||||
self.ColResizer()
|
||||
|
||||
|
7
vendor/github.com/cjbassi/termui/utils.go
generated
vendored
7
vendor/github.com/cjbassi/termui/utils.go
generated
vendored
@ -34,3 +34,10 @@ func Error(issue, diagnostics string) {
|
||||
fmt.Println()
|
||||
panic(1)
|
||||
}
|
||||
|
||||
func Max(x, y int) int {
|
||||
if x > y {
|
||||
return x
|
||||
}
|
||||
return y
|
||||
}
|
||||
|
@ -12,7 +12,7 @@ import (
|
||||
|
||||
type CPU struct {
|
||||
*ui.LineGraph
|
||||
Count int // number of CPUs
|
||||
Count int // number of cores
|
||||
interval time.Duration
|
||||
}
|
||||
|
||||
|
@ -55,7 +55,7 @@ func (self *Net) update() {
|
||||
self.Lines[0].Data = append(self.Lines[0].Data, int(recvRecent))
|
||||
self.Lines[1].Data = append(self.Lines[1].Data, int(sentRecent))
|
||||
|
||||
if recvRecent < 0 || sentRecent < 0 {
|
||||
if int(recvRecent) < 0 || int(sentRecent) < 0 {
|
||||
utils.Error("net data",
|
||||
fmt.Sprint(
|
||||
"curRecvTotal: ", curRecvTotal, "\n",
|
||||
|
Loading…
x
Reference in New Issue
Block a user