aboutsummaryrefslogtreecommitdiff
path: root/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'widgets')
-rw-r--r--widgets/aerc.go10
-rw-r--r--widgets/exline.go6
-rw-r--r--widgets/status.go4
3 files changed, 10 insertions, 10 deletions
diff --git a/widgets/aerc.go b/widgets/aerc.go
index 798a4dd..cc93d92 100644
--- a/widgets/aerc.go
+++ b/widgets/aerc.go
@@ -69,10 +69,10 @@ func NewAerc(logger *log.Logger) *Aerc {
})()
return &Aerc{
- grid: mainGrid,
- statusbar: statusbar,
- statusline: statusline,
- tabs: tabs,
+ grid: mainGrid,
+ statusbar: statusbar,
+ statusline: statusline,
+ tabs: tabs,
}
}
@@ -94,7 +94,7 @@ func (aerc *Aerc) Event(event tcell.Event) bool {
if event.Rune() == ':' {
exline := NewExLine(func(command string) {
aerc.statusline.Push(fmt.Sprintf("TODO: execute %s", command),
- 3 * time.Second)
+ 3*time.Second)
aerc.statusbar.Pop()
aerc.interactive = nil
}, func() {
diff --git a/widgets/exline.go b/widgets/exline.go
index de652ba..ae83933 100644
--- a/widgets/exline.go
+++ b/widgets/exline.go
@@ -1,8 +1,8 @@
package widgets
import (
- "github.com/mattn/go-runewidth"
"github.com/gdamore/tcell"
+ "github.com/mattn/go-runewidth"
"git.sr.ht/~sircmpwn/aerc2/lib/ui"
)
@@ -21,7 +21,7 @@ type ExLine struct {
onInvalidate func(d ui.Drawable)
}
-func NewExLine(commit func (cmd string), cancel func()) *ExLine {
+func NewExLine(commit func(cmd string), cancel func()) *ExLine {
return &ExLine{
cancel: cancel,
commit: commit,
@@ -43,7 +43,7 @@ func (ex *ExLine) Draw(ctx *ui.Context) {
ctx.Fill(0, 0, ctx.Width(), ctx.Height(), ' ', tcell.StyleDefault)
ctx.Printf(0, 0, tcell.StyleDefault, ":%s", string(ex.command))
cells := runewidth.StringWidth(string(ex.command[:ex.index]))
- ctx.SetCursor(cells + 1, 0)
+ ctx.SetCursor(cells+1, 0)
}
func (ex *ExLine) insert(ch rune) {
diff --git a/widgets/status.go b/widgets/status.go
index 3b4dbcc..b7d9490 100644
--- a/widgets/status.go
+++ b/widgets/status.go
@@ -31,7 +31,7 @@ func NewStatusLine() *StatusLine {
}
}
-func (status *StatusLine) OnInvalidate(onInvalidate func (d ui.Drawable)) {
+func (status *StatusLine) OnInvalidate(onInvalidate func(d ui.Drawable)) {
status.onInvalidate = onInvalidate
}
@@ -68,7 +68,7 @@ func (status *StatusLine) Push(text string, expiry time.Duration) *StatusMessage
message: text,
}
status.stack = append(status.stack, msg)
- go (func () {
+ go (func() {
time.Sleep(expiry)
for i, m := range status.stack {
if m == msg {