On Tue, Mar 10, 2020 at 08:55:06AM +0100, Pavel Sanda wrote: > On Tue, Mar 10, 2020 at 01:24:31AM -0400, Richard Kimberly Heck wrote: > > 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 > > Will be the cursor invalidated when depth of the paragraph changes after the > movement?
Thanks for taking a look, Riki and Pavel. I don't know the answers to your questions. I tried to test regarding Pavel's concern, but I don't know a situation when the depth changes; I think that these LFUNs might be disabled when using them would change the depth. I'm not sure of that though. 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. Scott
signature.asc
Description: PGP signature
-- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel