diff options
Diffstat (limited to 'widgets/exline.go')
-rw-r--r-- | widgets/exline.go | 6 |
1 files changed, 3 insertions, 3 deletions
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) { |