Subject: Re: bug#22460: 'y' command doesn't allow a comment after it one the same line

From: Jim Meyering <[email-masked]>
Date: Sat, 18 Mar 2017 20:34:48 -0700

On Thu, Jan 26, 2017 at 7:04 PM, Assaf Gordon <[email-masked]> wrote:
> Hello Thorsten,
>
> Sorry for the delayed response.
>
> On Mon, Jan 25, 2016 at 02:28:22AM +0100, Thorsten Heymann wrote:
>>
>> Unlike other commands, the current implementation of the 'y' command does
>> not allow a comment on the same line if the command is not
>> "terminated" by a ';'
>
>
> That is indeed a bug, and a rather old one.
>
> Your suggested fix is correct, but I thought that instead of
> duplicating the same few lines, it might be better to extract
> the code to a new function.
>
> The attached patch does that and adds a corresponding unit test.

Thank you, Thorsten, for the report and patch.

Hi Assaf,
Thanks a lot for improving it and adding tests.

Would you please separate the factoring-out of your new function and
the bug fix into two commits?
Maybe even putting the tests in a third.

A nit in the commit log, now that 4.4 is out, it should say sed-4.4,
not 4.3, of course.