pipe.go: let tab widget handle ellipsis
This commit is contained in:
parent
ef57300faf
commit
22cc40f4d4
|
@ -9,7 +9,6 @@ import (
|
||||||
"git.sr.ht/~sircmpwn/aerc/widgets"
|
"git.sr.ht/~sircmpwn/aerc/widgets"
|
||||||
|
|
||||||
"github.com/gdamore/tcell"
|
"github.com/gdamore/tcell"
|
||||||
"github.com/mattn/go-runewidth"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
@ -38,7 +37,7 @@ func Pipe(aerc *widgets.Aerc, args []string) error {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
name := args[1] + " <" + msg.Envelope.Subject
|
name := args[1] + " <" + msg.Envelope.Subject
|
||||||
aerc.NewTab(term, runewidth.Truncate(name, 32, "…"))
|
aerc.NewTab(term, name)
|
||||||
term.OnClose = func(err error) {
|
term.OnClose = func(err error) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
aerc.PushStatus(" "+err.Error(), 10*time.Second).
|
aerc.PushStatus(" "+err.Error(), 10*time.Second).
|
||||||
|
|
Loading…
Reference in New Issue