This commit is contained in:
Tulir Asokan 2018-04-01 10:28:46 +03:00
parent 1e082f9715
commit 2ba2fde396
3 changed files with 6 additions and 6 deletions

View File

@ -26,9 +26,9 @@ func Center(width, height int, p tview.Primitive) tview.Primitive {
return tview.NewFlex().
AddItem(tview.NewBox(), 0, 1, false).
AddItem(tview.NewFlex().
SetDirection(tview.FlexRow).
AddItem(tview.NewBox(), 0, 1, false).
AddItem(p, height, 1, true).
AddItem(tview.NewBox(), 0, 1, false), width, 1, true).
SetDirection(tview.FlexRow).
AddItem(tview.NewBox(), 0, 1, false).
AddItem(p, height, 1, true).
AddItem(tview.NewBox(), 0, 1, false), width, 1, true).
AddItem(tview.NewBox(), 0, 1, false)
}

View File

@ -30,7 +30,7 @@ var colorNames []string
func init() {
colorNames = make([]string, len(tcell.ColorNames))
i := 0
for name, _ := range tcell.ColorNames {
for name := range tcell.ColorNames {
colorNames[i] = name
i++
}

View File

@ -130,7 +130,7 @@ func (view *MessageView) updateWidestSender(sender string) {
type MessageDirection int
const (
AppendMessage MessageDirection = iota
AppendMessage MessageDirection = iota
PrependMessage
IgnoreMessage
)