[PATCH] outline-up/down: preserve cursor's position
Richard Kimberly Heck
rikiheck at lyx.org
Tue Mar 10 05:24:31 UTC 2020
On 3/9/20 9:25 PM, Scott Kostyshak wrote:
> Is there a reason to do the following for outline-up and outline-down?
>
> setCursor(cur, cur.pit(), 0);
>
> It does not seem to be necessary in my testing, but I'm wondering if
> there's a case I'm missing. Or perhaps it is not necessary but is
> desired behavior for some reason?
>
> It has been this way for a long time, at least since 71f356c3.
>
> Attached is a patch to remove it so that the cursor position does not
> change when executing those actions.
Is there a concern that these actions might invalidate the cursor? Maybe
that is taken care of along the way, but I've just fixed a bug involving
accepting changes in the outliner
https://www.lyx.org/trac/ticket/10316
that led to a crash for this reason.
Riki
More information about the lyx-devel
mailing list