How to not convert layout when pasting?

Jean-Marc Lasgouttes lasgouttes at lyx.org
Thu Apr 8 17:29:47 UTC 2021


Le 08/04/2021 à 18:01, Scott Kostyshak a écrit :
> Sometimes I want to copy something from an itemize environment and paste it into a new enumerate item. If I start a new enumerate item and just paste, LyX converts the layout to itemize. My workaround is to type "a" and then paste. This way, the enumerate is preserved. Then I delete the "a". I forget why I developed this habit rather than just pasting, let LyX convert to itemize, then simply convert back to enumerate. Perhaps the nesting was not fixed when I do this instead? In any case, that's not ideal either.


What is done in other situations is to differentiate on whether a full 
paragraph is pasted or just a fragment of a paragraph. This is the case 
when inserting an inset over a selection. Would that work for you here?

Otherwise the test for emptyness is explicit in the code, it is easy to 
remove. We could test whether the receiving layout is the default layout 
instead.

JMarc



More information about the lyx-devel mailing list