Update termui for bug fixes
This commit is contained in:
parent
1225515f3e
commit
a6bcf57ecb
2
Gopkg.lock
generated
2
Gopkg.lock
generated
|
@ -17,7 +17,7 @@
|
|||
branch = "master"
|
||||
name = "github.com/cjbassi/termui"
|
||||
packages = ["."]
|
||||
revision = "f1b2f22c3713217ceeb39b297418fabce7bb7e6e"
|
||||
revision = "39b79d4cffc860780782f8ca6cca4bbb9d38bbf2"
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
|
|
12
vendor/github.com/cjbassi/termui/table.go
generated
vendored
12
vendor/github.com/cjbassi/termui/table.go
generated
vendored
|
@ -57,20 +57,16 @@ func (self *Table) ColResize() {
|
|||
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)
|
||||
// }
|
||||
|
||||
self.ColResizer()
|
||||
|
||||
// prints header
|
||||
for i, width := range self.ColWidths {
|
||||
for i, h := range self.Header {
|
||||
width := self.ColWidths[i]
|
||||
if width == 0 {
|
||||
break
|
||||
}
|
||||
r := MaxString(self.Header[i], self.X-6)
|
||||
buf.SetString(self.CellXPos[i], 1, r, self.Fg|AttrBold, self.Bg)
|
||||
h = MaxString(h, self.X-6)
|
||||
buf.SetString(self.CellXPos[i], 1, h, self.Fg|AttrBold, self.Bg)
|
||||
}
|
||||
|
||||
// prints each row
|
||||
|
|
7
vendor/github.com/cjbassi/termui/utils.go
generated
vendored
7
vendor/github.com/cjbassi/termui/utils.go
generated
vendored
|
@ -34,10 +34,3 @@ func Error(issue, diagnostics string) {
|
|||
fmt.Println()
|
||||
panic(1)
|
||||
}
|
||||
|
||||
func Max(x, y int) int {
|
||||
if x > y {
|
||||
return x
|
||||
}
|
||||
return y
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user