diff options
Diffstat (limited to 'widgets/compose.go')
-rw-r--r-- | widgets/compose.go | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/widgets/compose.go b/widgets/compose.go index 5db377be..14fce3ce 100644 --- a/widgets/compose.go +++ b/widgets/compose.go @@ -1265,15 +1265,14 @@ func (c *Composer) termClosed(err error) { } return } + // delete previous headers first for _, h := range c.headerOrder() { - if embedHeader.Get(h) == "" { - // user deleted header in text editor - c.delEditor(h) - } + c.delEditor(h) } hf := embedHeader.Fields() for hf.Next() { if hf.Value() != "" { + // add new header values in order c.addEditor(hf.Key(), hf.Value(), false) } } |