diff --git a/mail/send.go b/mail/send.go index 28573f89..38afb041 100644 --- a/mail/send.go +++ b/mail/send.go @@ -34,16 +34,16 @@ func (a *App) Compose() { //types:add a.ComposeMessage.To = []*mail.Address{{}} b := core.NewBody().AddTitle("Send message") core.NewForm(b).SetStruct(a.ComposeMessage) - te := texteditor.NewSoloEditor(b) - te.Buffer.SetLang("md") - te.Buffer.Options.LineNumbers = false - te.Styler(func(s *styles.Style) { + ed := texteditor.NewSoloEditor(b) + ed.Buffer.SetLang("md") + ed.Buffer.Options.LineNumbers = false + ed.Styler(func(s *styles.Style) { s.SetMono(false) }) b.AddBottomBar(func(pw core.Widget) { b.AddCancel(pw) b.AddOK(pw).SetText("Send").OnClick(func(e events.Event) { - a.ComposeMessage.Body = te.Buffer.String() + a.ComposeMessage.Body = ed.Buffer.String() a.SendMessage() }) }) diff --git a/terminal/app.go b/terminal/app.go index 625af9aa..850c0aca 100644 --- a/terminal/app.go +++ b/terminal/app.go @@ -156,12 +156,12 @@ func (a *App) RunCmd(cmd string, cmds *core.Frame, dir *core.Text) error { buf.NewBuffer(0) buf.Options.LineNumbers = false - te := texteditor.NewEditor(cfr).SetBuffer(buf) - te.Styler(func(s *styles.Style) { + ed := texteditor.NewEditor(cfr).SetBuffer(buf) + ed.Styler(func(s *styles.Style) { s.Min.Set(units.Em(30), units.Em(10)) s.Background = cfr.Styles.Background }) - te.OnKeyChord(func(e events.Event) { + ed.OnKeyChord(func(e events.Event) { kc := e.KeyChord() kf := keymap.Of(kc)