On 7/8/25 2:41 PM, Scott Kostyshak wrote:
On Mon, Jul 07, 2025 at 12:27:55PM -0400, Richard Kimberly Heck wrote:
On 7/7/25 11:45 AM, Jean-Marc Lasgouttes wrote:
Le 07/07/2025 à 17:31, Scott Kostyshak a écrit :
The root issue is the ones discussed above, that when we do Insert
Branch on the selection, unexpected things happen.
Not with the selection done by the context menu, right? Only if the
end-of-paragraph of the previous paragraph has been selected too.
I'm still puzzled why this removes the section heading. Obviously, we have
an empty Standard paragraph above now. That shouldn't, it seems to me, cause
the next paragraph (the section) to be reset. What I'd expect is that the
empty paragraph just disappears.
So there's this odd intermediate case: where you ONLY select the previous
end of paragraph marker.
Attached is the local patch I use. If I use this patch and select the
section and insert it into a branch, it works as I expected.
I don't understand the technical details at all. But it's related to the
following:
https://www.lyx.org/trac/ticket/12251#comment:7
and to commits 2da183bf and d9af7a0f.
I have looked at this, and I think I understand what's happening now.
The first thing to note is that, if you select from the end of the
previous paragraph, then the branch inset itself is part of that
paragraph: Its last character. This is probably not what the user
intended: In effect, the line break has been lost. The cut left an empty
pargraph at the beginning of the new branch, so it gets removed by DEPM.
The bug arises because, when we try to reset the layout of the first
paragraph, that paragraph is gone, and we end up resetting the layout of
the second paragraph.
I think it wouldn't be hard to catch this special case. But what do you
want to happen in the case of an itemized list?
Riki
--
lyx-users mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-users