Skip to content

Lines are trimmed when replying to selection #114

Description

@CendioOssman

This is a very nice addon that makes it much easier to read mails with diffs in them, but it has one annoying bug:

If you select a portion to reply to, then whitespace gets trimmed and the quote in the reply gets garbled. This does not happen if you reply to the entire mail (without selecting anything).

As an example, selecting the following in the original mail:

@@ -57,7 +58,7 @@
         (unwilling, _) = self._get_handlers()
 
         imp = MagicMock()
-        gi = imp.return_value
+        imp.side_effect = lambda *a, **kw: attrgetter(a[0])(imp)

And then replying, gives the following new message without the addon:

On 6/15/22 15:40, Pierre Ossman wrote:
> @@ -57,7 +58,7 @@
>           (unwilling, _) = self._get_handlers()
>   
>           imp = MagicMock()
> -        gi = imp.return_value
> +        imp.side_effect = lambda *a, **kw: attrgetter(a[0])(imp)

But with the addon we get this:

On 15/06/2022 15:40, Pierre Ossman wrote:
> |@@ -57,7 +58,7 @@ (unwilling, _) = self._get_handlers() imp = 
> MagicMock() - gi = imp.return_value + imp.side_effect = lambda *a, **kw: 
> attrgetter(a[0])(imp)|

(note that there is some whitespace trimming in the "good" case as well, but that's a thunderbird bug)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions