[LyX/master] Fix cursor navigation in \overbrace and \underbrace

Scott Kostyshak skostysh at lyx.org
Mon Mar 1 02:06:21 UTC 2021


On Fri, Feb 26, 2021 at 08:31:43PM +0100, Enrico Forestieri wrote:
> commit c2facb8c565610d6a702c39b2f95572551f624be
> Author: Enrico Forestieri <forenr at lyx.org>
> Date:   Fri Feb 26 20:30:41 2021 +0100
> 
>     Fix cursor navigation in \overbrace and \underbrace
>     
>     Due to the way these decorations are implemented, entering
>     them with the cursor (either form right or left) required
>     pressing two times cursor left or right.
>     
>     Fixes #2264
> ---

I think this commit introduced an issue:

1. Start a math inset and enter ^2 (i.e., empty base of the exponent).
3. Put the cursor outside of the math inset.
4. Use the arrow key to move back inside the inset.

I get the following:

  /usr/include/c++/9/debug/vector:464:
  In function:
      std::__debug::vector<_Tp, _Allocator>::const_reference 
      std::__debug::vector<_Tp, _Allocator>::back() const [with _Tp = 
      lyx::MathAtom; _Allocator = std::allocator<lyx::MathAtom>; 
      std::__debug::vector<_Tp, _Allocator>::const_reference = const 
      lyx::MathAtom&]
  
  Error: attempt to access an element in an empty container.
  
  Objects involved in the operation:
      sequence "this" @ 0x0x558c44f10400 {
        type = std::__debug::vector<lyx::MathAtom, std::allocator<lyx::MathAtom> >;
      }

Can you reproduce?

Scott
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20210228/d98a5933/attachment.asc>


More information about the lyx-devel mailing list