change in behavior of cursor movement in math array
Jean-Marc Lasgouttes
lasgouttes at lyx.org
Tue Jul 2 16:10:54 UTC 2024
Le 02/07/2024 à 17:53, Udicoudco a écrit :
> On Tue, Jul 2, 2024 at 6:39 PM Jean-Marc Lasgouttes <lasgouttes at lyx.org> wrote:
>> The place you are looking for is InsetMathGrid::firstIdx. It enters by
>> the first/middle/last row depending on the vertical alignment of the inset.
>>
>> I guess the change happened at commit 503c7c16, but this was not my
>> intention. It seems that the logic has always been there, but that it
>> was disabled by some bug.
>
> Oh I see, thanks.
>
>>
>> Do you find it really annoying?
>
> Not me personally,
> but I've got a couple of reports
> about custom shortcuts not working
> properly, and I believe this is the reason.
>
> Here is a command that should create a new line
> with the content of the last cell
>
> command-sequence math-mutate align; line-end; line-end; line-end;
> char-backward; newline-insert newline; line-begin-select; copy;
> cell-forward; cell-forward; paste
>
> Note that the reporter himself
> stated that it might not be worth fixing it,
> and I don't have any strong opinion.
This is a problem that we have in function for interactive use vs
functions for scripting. This is why, for example, char-delete-backward
has a "confirm" argument (select big insets instead of deleting them).
We could come up with some arguments to function to work around this. It
would be even better to detect automatically whether a function is
interactive or in script mode, but I do not know how to define that.
JMarc
More information about the lyx-devel
mailing list