diff options
Diffstat (limited to 'lib/ui')
-rw-r--r-- | lib/ui/borders.go | 3 | ||||
-rw-r--r-- | lib/ui/context.go | 3 | ||||
-rw-r--r-- | lib/ui/tab.go | 6 | ||||
-rw-r--r-- | lib/ui/textinput.go | 3 | ||||
-rw-r--r-- | lib/ui/ui.go | 1 |
5 files changed, 10 insertions, 6 deletions
diff --git a/lib/ui/borders.go b/lib/ui/borders.go index 6a5e9dc9..8d381b91 100644 --- a/lib/ui/borders.go +++ b/lib/ui/borders.go @@ -22,7 +22,8 @@ type Bordered struct { } func NewBordered( - content Drawable, borders uint, uiConfig *config.UIConfig) *Bordered { + content Drawable, borders uint, uiConfig *config.UIConfig, +) *Bordered { b := &Bordered{ borders: borders, content: content, diff --git a/lib/ui/context.go b/lib/ui/context.go index 7936f359..fc2104df 100644 --- a/lib/ui/context.go +++ b/lib/ui/context.go @@ -63,7 +63,8 @@ func (ctx *Context) SetCell(x, y int, ch rune, style tcell.Style) { } func (ctx *Context) Printf(x, y int, style tcell.Style, - format string, a ...interface{}) int { + format string, a ...interface{}, +) int { width, height := ctx.viewport.Size() if x >= width || y >= height { diff --git a/lib/ui/tab.go b/lib/ui/tab.go index fd49dfee..bcad23c2 100644 --- a/lib/ui/tab.go +++ b/lib/ui/tab.go @@ -36,8 +36,10 @@ type Tab struct { uiConf *config.UIConfig } -type TabStrip Tabs -type TabContent Tabs +type ( + TabStrip Tabs + TabContent Tabs +) func NewTabs(uiConf *config.UIConfig) *Tabs { tabs := &Tabs{} diff --git a/lib/ui/textinput.go b/lib/ui/textinput.go index 9d1de963..8f8f00d0 100644 --- a/lib/ui/textinput.go +++ b/lib/ui/textinput.go @@ -59,7 +59,8 @@ func (ti *TextInput) Prompt(prompt string) *TextInput { } func (ti *TextInput) TabComplete( - tabcomplete func(s string) ([]string, string), d time.Duration) *TextInput { + tabcomplete func(s string) ([]string, string), d time.Duration, +) *TextInput { ti.tabcomplete = tabcomplete ti.completeDelay = d return ti diff --git a/lib/ui/ui.go b/lib/ui/ui.go index b65c06a4..1f618a6f 100644 --- a/lib/ui/ui.go +++ b/lib/ui/ui.go @@ -19,7 +19,6 @@ type UI struct { } func Initialize(content DrawableInteractive) (*UI, error) { - screen, err := tcell.NewScreen() if err != nil { return nil, err |