Merge paragraphs of different non-Default/Plain Layouts

Daniel xracoonx at gmx.de
Wed Jul 22 17:27:50 UTC 2020


On 2020-07-21 21:43, Richard Kimberly Heck wrote:
> On 7/21/20 3:13 PM, Daniel wrote:
>> I am always a little stumped that it is not allowed to merge two
>> paragraphs by pressing backspace (delete) at the first (last) position
>> of a paragraph where there is another layout in the previous (next)
>> paragraph.
>>
>> I think I found the passage in the source which sound as if this is an
>> important idea:
>>
>>      // FIXME: Do we really not want to allow this???
>>      // Pasting is not allowed, if the paragraphs have different
>>      // layouts. I think it is a real bug of all other
>>      // word processors to allow it. It confuses the user.
>>      // Correction: Pasting is always allowed with standard-layout
>>      // or the empty layout.
>>      else if (par.layout() == prevpar.layout()
>>           || tclass.isDefaultLayout(par.layout())
>>           || tclass.isPlainLayout(par.layout())) {
>>          cur.recordUndo(prevcur.pit());
>>          mergeParagraph(bufparams, plist, prevcur.pit());
>>          needsUpdate = true;
>>      }
>>
>> Unfortunately, I don't see why it is such a bad idea to merge in this
>> case. Maybe someone can enlighten me. I find it hard to train my brain
>> to consider the layout circumstances when trying to merge paragraphs.
>> Hence, I would suggest to remove the check.
> 
> I also find this frustrating. I wonder if there's not some compromise,
> if people do think this is important. E.g., double backspace would force
> the merge.
> 
> Riki

I guess there should be some kind of reaction when backspace is pressed 
for the first time. Maybe select from the end of the previous paragraph 
to the start of the current paragraph via LFUN_CHAR_BACKWARD_SELECT? 
Anyway, for me it is hard to say whether this is a reasonable compromise 
since I still don't know what was the reason for the current behavior 
one. Can you see from git who added the comment? Is that person still 
around to ask?

Daniel



More information about the lyx-devel mailing list