[LyX/master] outline-up/down: preserve cursor's position
Richard Kimberly Heck
rikiheck at lyx.org
Wed Mar 11 20:08:12 UTC 2020
On 3/11/20 4:03 PM, Scott Kostyshak wrote:
> On Wed, Mar 11, 2020 at 03:48:04PM -0400, Richard Kimberly Heck wrote:
>> On 3/11/20 3:12 PM, Jean-Marc Lasgouttes wrote:
>>> Le 11/03/2020 à 19:14, Scott Kostyshak a écrit :
>>>> commit adb7283b69f5dddfabb8d807a432cd1e5e60b221
>>>> Author: Scott Kostyshak <skostysh at lyx.org>
>>>> Date: Wed Mar 11 14:18:33 2020 -0400
>>>>
>>>> outline-up/down: preserve cursor's position
>>>> There is no need to change the cursor's position to the
>>>> beginning of
>>>> the line.
>>>> This change does not affect the behavior of using the
>>>> buttons in the
>>>> Outliner pane, but is useful for using the keyboard shortcuts.
>>> What is the difference between the two code paths?
>> One has OutlineUp and one has OutlineDown?
> I'm glad I'm not the only one that originally interpretted JMarc's
> comment like that. I made a patch thinking he was hinting that I should
> combine the code to reduce duplication. See attached. Now I realize
> that's not what he was trying to say, and I'm not sure the patch
> actually makes things more clear.
>
> I now realize he was referring to my commit message that the change does
> not affect behavior in the Outliner pane. Regarding that interpretation,
> if you click on a section in the outline, the cursor is automatically
> moved to position 0 which makes sense in my opinion. Also, if you place
> the cursor yourself in a section and then just click on the down arrow,
> the cursor position is still moved to position 0. I'm not sure where
> this latter behavior happens. I could take a look if we wanted to
> consider removing it. Note that TocWidget.cpp still ends up calling the
> LFUN handled by Text3 (i.e., the code touched by this commit), but I
> guess the positioning is done before or after.
I think he must have been asking the other question, indeed.
Riki
More information about the lyx-devel
mailing list