[LyX/master] Tab binding: outline-in before depth-increment

Richard Kimberly Heck rikiheck at lyx.org
Thu Sep 10 16:22:03 UTC 2020


On 9/10/20 11:52 AM, Scott Kostyshak wrote:
> On Thu, May 16, 2019 at 07:54:41PM +0200, Scott Kostyshak wrote:
>> commit 9ab9f2b1acb8bc1a40d5a69737b43d09b7f7a597
>> Author: Scott Kostyshak <skostysh at lyx.org>
>> Date:   Thu May 16 13:58:18 2019 -0400
>>
>>     Tab binding: outline-in before depth-increment
>>     
>>     Same for BackTab. The outline-in was originally (31398779)
>>     introduced to the command-sequence at the end. Probably it was
>>     placed at the end to be conservative (i.e., so that it would only
>>     change behavior where there was a no-op before).
>>     
>>     This fixes #11576.
>> ---
>>  lib/bind/site.bind |    4 ++--
>>  1 files changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/lib/bind/site.bind b/lib/bind/site.bind
>> index 4c3c609..615c685 100644
>> --- a/lib/bind/site.bind
>> +++ b/lib/bind/site.bind
>> @@ -27,10 +27,10 @@ Format 5
>>  \bind "Up"         "up"
>>  \bind "Down"       "down"
>>  
>> -\bind "Tab"        "command-alternatives completion-accept;cell-forward;tab-insert;depth-increment;outline-in"
>> +\bind "Tab"        "command-alternatives completion-accept;cell-forward;tab-insert;outline-in;depth-increment"
>>  \bind "C-Tab"      "cell-split"
>>  \bind "~S-ISO_Left_Tab"    "cell-backward"
>> -\bind "~S-BackTab" "command-alternatives cell-backward;tab-delete;depth-decrement;outline-out"
>> +\bind "~S-BackTab" "command-alternatives cell-backward;tab-delete;outline-out;depth-decrement"
> This commit introduced a regression (also in stable). To reproduce:
>
> 1. open the attached file.
> 2. convert the "standard" layout to "frame" (it will be nested).
> 3. try to unnest the frame with shift+tab.
>
> Result: on 2.3.x and master, it becomes a subsubsection. On 2.3.0, it
> has the expected (to me) result of unnesting the frame.
>
> The reason for the 2.3.x behavior is because of the change of order of
> the command alternatives in this commit. outline-out succeeds. From what
> I understand, outline-out succeeds because in the Frame layout, the
> TocLevel is set.
>
> If we revert this commit, we reintroduce #11576.
>
> I don't know much about layouts so I'm not sure what the best approach
> is. 

One possible solution would be a new layout tag: ProhibitNesting, off by
default.

Riki




More information about the lyx-devel mailing list