Comments on patch for paragraph-move-down to move sub-items as well
Scott Kostyshak
skostysh at lyx.org
Sun Feb 2 21:27:57 UTC 2020
On Sat, Feb 01, 2020 at 08:43:15PM +0100, Jean-Marc Lasgouttes wrote:
> Le 01/02/2020 à 18:40, Scott Kostyshak a écrit :
> > 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.
>
> Hi Scott,
>
> I cannot really comment on the patch, but it looks like a very good idea.
Thanks. I'll continue working on it.
> > - The algorithm for swapping the paragraphs in this patch is
> > inefficient (i.e., the end result could be achieved with fewer
> > swaps). I can work on a more efficient algorithm.
Since RandomAccessList is a list, it should be easy to just use insert
and remove.
Scott
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20200202/90beeb75/attachment.asc>
More information about the lyx-devel
mailing list