diff options
Diffstat (limited to 'commands/msg/forward.go')
-rw-r--r-- | commands/msg/forward.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/commands/msg/forward.go b/commands/msg/forward.go index bc5953f5..8fc34aa7 100644 --- a/commands/msg/forward.go +++ b/commands/msg/forward.go @@ -1,6 +1,7 @@ package msg import ( + "bufio" "bytes" "errors" "fmt" @@ -164,7 +165,10 @@ func (forward) Execute(aerc *widgets.Aerc, args []string) error { } store.FetchBodyPart(msg.Uid, part, func(reader io.Reader) { buf := new(bytes.Buffer) - buf.ReadFrom(reader) + scanner := bufio.NewScanner(reader) + for scanner.Scan() { + buf.WriteString(scanner.Text() + "\n") + } original.Text = buf.String() // create composer |