Skip to content

Commit

Permalink
rename te to ed; better
Browse files Browse the repository at this point in the history
  • Loading branch information
kkoreilly committed Jul 13, 2024
1 parent ebef3c1 commit a9a4582
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions mail/send.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
})
})
Expand Down
6 changes: 3 additions & 3 deletions terminal/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit a9a4582

Please sign in to comment.