Comments on patch for paragraph-move-down to move sub-items as well

Richard Kimberly Heck rikiheck at lyx.org
Mon Feb 3 00:08:50 UTC 2020


On 2/1/20 12:40 PM, Scott Kostyshak wrote:
> I've been working on a patch for LFUN_PARAGRAPH_MOVE_DOWN move subitems
> of an item along with the item. For example, consider the following
> situation:
>
>   1. One item <cur>
>      a. "subitem"
>   2. Another item
>
> Currently (i.e., without the patch), if the cursor is at positiion <cur>
> and the user executes a paragraph-move-down, we get the following:
>
>   1. "subitem"
>   2. One item <cur>
>   3. Another item
>
> With the patch, the user would get the following:
>
>   1. Another item
>   2. One item <cur>
>      a. "subitem"
>
> I believe this functionality would be consistent with the current
> behavior of outline-down (which has the same keybinding as
> paragraph-move-down), e.g., subsections are moved with sections.
>
> Does anyone have comments on the patch, either the desired functionality
> or the actual code?

I have found the existing functionality annoying at time, so I do think
your approach is better. I didn't see anything in the patch. The logic
seems very complex!

I assume one would also want to do the same thing for paragraph-move-up?
If so, then probably you can extract a lot of common code here.

Riki




More information about the lyx-devel mailing list