diff --git a/Gopkg.lock b/Gopkg.lock index 4e588d5..2ee7a27 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -17,7 +17,7 @@ branch = "master" name = "github.com/cjbassi/termui" packages = ["."] - revision = "f1b2f22c3713217ceeb39b297418fabce7bb7e6e" + revision = "39b79d4cffc860780782f8ca6cca4bbb9d38bbf2" [[projects]] branch = "master" diff --git a/vendor/github.com/cjbassi/termui/table.go b/vendor/github.com/cjbassi/termui/table.go index 79dd6f2..1e962a6 100644 --- a/vendor/github.com/cjbassi/termui/table.go +++ b/vendor/github.com/cjbassi/termui/table.go @@ -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 diff --git a/vendor/github.com/cjbassi/termui/utils.go b/vendor/github.com/cjbassi/termui/utils.go index bfb0502..614828b 100644 --- a/vendor/github.com/cjbassi/termui/utils.go +++ b/vendor/github.com/cjbassi/termui/utils.go @@ -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 -}