[PATCH] outline-up/down: preserve cursor's position

Jean-Marc Lasgouttes lasgouttes at lyx.org
Wed Mar 11 14:43:00 UTC 2020


Le 10/03/2020 à 15:31, Scott Kostyshak a écrit :
> Perhaps the following be more reasonable and safer?
> 
>    setCursor(cur, cur.pit(), cur.pos());
> 
> The above seems safe since I'm just changing "0" to "cur.pos()", and I
> don't see how the length of the paragraph can change after this
> operation.

This might be a safer option, since Text::setCursor does some things 
that may or may not be useful here. Actually nobody knows and nobody 
dares to simplify the code there.

JMarc


More information about the lyx-devel mailing list