Single Container View: truncate ID

Truncation Id inside of NewSingle() doesn't work.
It even doesn't have any effect.
Instead truncate the ID inside of NewMeta() call
This commit is contained in:
Sergey Ponomarev
2020-11-03 14:11:58 +02:00
parent ecc7bf4081
commit 2bcfc365f7
4 changed files with 5 additions and 9 deletions

View File

@@ -13,14 +13,13 @@ type Info struct {
data map[string]string
}
func NewInfo(id string) *Info {
func NewInfo() *Info {
p := ui.NewTable()
p.Height = 4
p.Width = colWidth[0]
p.FgColor = ui.ThemeAttr("par.text.fg")
p.Separator = false
i := &Info{p, make(map[string]string)}
i.Set("id", id)
return i
}