On 10/4/15, 2:36 AM, "Harbs" <harbs.li...@gmail.com> wrote:

>I just looked into what is needed to fix this.
>
>There’s two ways it could be handled:
>1) All the text takes on the formatting of the first insertion point.
>2) If there’s multiple paragraphs selected, the paragraphs pasted take on
>the formatting of the existing paragraphs (i.e. incoming para 1 takes on
>existing para 1, para 2 takes on #2, etc.) if there’s more incoming
>paragraphs than existing ones, the last para take on the formatting of
>the last para.
>
>I think option #2 is somewhat more preferable, but seems harder to
>implement. I think either one is an acceptable solution.

I thought this was strictly about plain text insertion, in which case #1
would be my expectations.

If there is formatting available, the formatting should be preserved, IMO.

>
>Here’s my question:
>
>It loks to me like replacing line 254 in TextFlowEdit.as:
>                                       if (applyFormat && firstParagraph)
>with:
>                                       if (applyFormat)
>gets the effect of #1, but I’m not sure why the firstParagraph condition
>is there. I made the change and all tests still seem to pass, so at first
>blush this seems like a good easy way to fix this bug. But I don’t want
>to remove the condition without understanding it.
>
>Is there any way to see when that condition was added and maybe figure
>out why?

Git blame should show you.

-Alex

Reply via email to