aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--widgets/compose.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/widgets/compose.go b/widgets/compose.go
index 608b8532..f7bce6d4 100644
--- a/widgets/compose.go
+++ b/widgets/compose.go
@@ -1229,14 +1229,16 @@ func (c *Composer) termClosed(err error) {
return
}
for _, h := range c.headerOrder() {
- if !embedHeader.Has(h) {
+ if embedHeader.Get(h) == "" {
// user deleted header in text editor
c.delEditor(h)
}
}
hf := embedHeader.Fields()
for hf.Next() {
- c.addEditor(hf.Key(), hf.Value(), false)
+ if hf.Value() != "" {
+ c.addEditor(hf.Key(), hf.Value(), false)
+ }
}
}